In this video we'll look at the Top 10 things to know in SPSS for beginners.
Number 1: The Variable View and Data View Tabs. So if you look down towards
the bottom of the screen, you'll see two tabs, Data View and Variable View.
And in this window here we have the Data View tab open, as it has the gold
background.
And you can see here on your screen that we have a very small data set where we
have a variable gender and a variable exam 1, which corresponds to the exam scores
on the first exam for ten different people.
The names of these two tabs give a big clue as to their purpose. For example, if
I want to create variables, like say that we want to create another variable,
scores on the second exam. So I might want to name this variable Exam_2.
If I want to create a variable, then I want to go to the Variable View tab.
And if I want to enter data or numbers, then I want to go to the Data View tab.
So we want to create a variable, Exam_2. Let's go ahead and go to the Variable
View tab, and then underneath Exam_1 in Row 3 here, I'll go ahead and
click on this cell under Name and type Exam_2.
Now you could call it just Exam2 if you wanted to, but I like to have the
underscore to make it stand out a little more.
And then I'll press Enter,
and the values to the right fill in automatically.
Now we just created the variable Exam_2 and now I want to go ahead and enter
the values for exam two.
So to do that I'll go to the Data View tab, since now I'm going to enter the
values, or enter my data.
So here after I enter each score on the exam, I press the Enter key and that
moves it down.
OK so I've entered all those values for Exam_2.
So once again when I want to enter data I go to the Data View tab, and when I
want to create or modify a variable,
I go to the Variable View tab. Number 2: Variable Names - Rules for Naming. so when
I name variables there's a few rules I have to make sure I follow,
otherwise I might run into trouble. And why don't we go ahead and break those
rules to see what happens if we do.
And one thing you cannot do is start a variable name with a number. So I'll just
call this 2test,
just as an example. Press the Enter key, and notice I get an error message
'Variable name contains an illegal first character.' So I can't start a variable
name with a number. But as you can see here I can certainly use a number at the
end of a variable name. But I just can't start a variable name with a number,
otherwise I'll get an error message.
Something else I cannot do if I wanted to have, let's say exam 3 here,
I cannot have a space, notice there's a space here in this naming, if I press Enter,
I get the error message again: it contains an illegal character.
One other thing I want to stay away from is using special characters or symbols.
So, for example, exam
asterisk three (exam*3), that's going to give me trouble as well. And something like an
ampersand will do it to. Exam&3,
that gives me trouble as well. And I can use 3 at the end,
that's fine. I can use 3 throughout, except as the first character, and that's
fine too.
FOr spaces what I do since we can't use them, I like to use this underscore, and
that works fine.
In summary, the three things we don't want to do is we don't want to start a
variable with the number,
we don't want to use any spaces, and we also don't want to use any special
characters or symbols in naming our variables.
I'll go and delete these by grabbing the row headings here, clicking on the right
mouse button, and selecting clear.
Number 3: Creating Value Labels. Now if we go to our Data View tab and I look
at my variable gender here,
notice I have 1s and 2s. And the 1s and 2s differentiate between males and
females.
However, as my dataset currently exists,
it's not entered in here which gender is a 1 and which gender is a 2.
So I want to make sure I do that, so that if I go back to this data set later, I'll
remember females were a 2, for example. And there's another useful reason why I
want to do that as well, and that is when I run analyses and get tables of output,
if I don't have value labels then I'll just get 1 and 2 reported, but if I
do have value labels,
then I'll get the labels that I actually used reported, like male and female, and it
just makes it a little bit easier when I read the output and I'm less likely to
make a mistake.
So let's go ahead and see how to enter this value labels. So I'm going to work
on that variable, so I'll go to the Variable View tab, and then under gender
where it says Values, in this column here, I'll click on the cell. And notice here
that the three dots appear.
Go ahead and click on that. And then here we see Value Labels and recall that I
have values of 1 and 2.
So under Value I'm going to put the number, the first one, 1, and 1 correspond
to male, so put male for Label, and then click Add. And notice how it throws it
down here 1=male. And if 1s male, than 2 is female.
So go ahead and enter that in. Click Add. And then once you see the labels down in
the box here,
go ahead and click OK. And that's it for creating Value Labels. Number 4:
Displaying Value Labels.
So now that I've entered the value labels, I can display them as male and female if I
want in my spreadsheet here. And to do that I want to go up here and click on
this button, which is known as the Value Labels button.
So go ahead and click on that. And then notice here now we see male and female
instead of 1 and 2.
Now this is really just a cosmetic effect here,
it's important to note that SPSS still records the 1s and 2s behind the
scenes, and when we perform analyses,
they are performed on the 1s and the 2s.
This is just for our preference, if we like to see this here, then we can click
on that Value Labels button to have them displayed.
Notice how it appears that the value labels button is pressed in.
So if I want to turn off those labels I just go ahead and click on that button
again, and then now you can see that they are in fact turned off. But, once again,
they're still in SPSS behind the scenes. And if I save this data file,
come back to it later, they will still be there, I just have to click on this
button, and if I run any analyses, they will be output in the results. So instead
of 1 and 2, I'll have male and female labeled in my tables.