0% found this document useful (0 votes)
42 views

Working With Variables in SPSS Statistics

The document discusses how to define and enter data into SPSS Statistics. It covers defining variables, entering data for separate groups and repeated measures, and mixing separate groups with repeated measures. Key steps include defining variable properties, entering one case per row, creating grouping variables to separate groups, and adding multiple columns for repeated measures variables.

Uploaded by

Wai Kiki
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Working With Variables in SPSS Statistics

The document discusses how to define and enter data into SPSS Statistics. It covers defining variables, entering data for separate groups and repeated measures, and mixing separate groups with repeated measures. Key steps include defining variable properties, entering one case per row, creating grouping variables to separate groups, and adding multiple columns for repeated measures variables.

Uploaded by

Wai Kiki
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

(Psych 122) PSYCHOLOGICAL STATISTICS (LABORATORY)

Professor: Mary Grace O. Gumpal

Working with Variables in SPSS Statistics

In SPSS Statistics, you need to define your variables, which occur in the Variables View. To access the
Variable View you need to click the Variables View tab as shown below:

In this Variable View, you can adjust the properties of each of your variables under 10 categories: Name,
Type, Width, Decimals, Label, Values, Missing, Columns, Align and Measure.

 To change the name of a column (variable) in the Data View sheet, click in the
appropriate cell and type in the new name. The names in this column must not start with a number. They
also cannot contain special characters such as / * $, space etc. You will be given an error message if your
name is in illegal format.

 To define the type of data contained in the column (e.g., characters, strings, numbers,
etc.), click on the appropriate row in the Type column.

 You can alter the number of digits displayed in the column by clicking in the appropriate
Width cell.

 You can alter the number of digits after the decimal place by clicking in the appropriate
Width cell.

 Click on the appropriate cell in the Labels column to give a long description, which
will help you to understand the variable you are referring to.

 You can give a text label for category codes by clicking on the appropriate cell in the
column values. Default is None.

First, click on the "None" cell box and then on the   button, as show in the diagram below:

1
In the -Value Labels-, enter the numeric code value "1" in the text box, Value:. This value corresponds to
the group representing "Males", so enter "Males" in the Label: box.

Click on the   button.

Repeat the above, entering "2" in the Value: box and "Female" in the Label: box, and click on
the   button.

You will be presented with the following screen:

Click on the   
button.

2
 To define different type of missing value code, click on the appropriate cell in the Missing
column.

 The width of column in the data view sheet can be altered by clicking in the appropriate
Column cell.

 To align the text or numbers in Data View, click in the appropriate Align cell.

 To label the scale of data, click in the appropriate Measure cell. In our example, we
need to select the "Nominal" value.

You can now see the results of your labelling by clicking the   button in the Data Editor View, as
shown below:

Entering Data in SPSS Statistics

The "one person, one row" Rule

3
SPSS Statistics sets out its data in a spreadsheet-like manner. The principle behind entering data
in almost all cases in SPSS Statistics is to enter each unique case on a new row. A case is the "object"
which you are measuring in someway. Usually, a case is an individual, but it can also be a commercial
product or a biological cell (or something else entirely). For the purposes of this explanation, we shall
assume that a case is an individual. Therefore, when entering data into SPSS Statistics you must put one
person's data on one row only. If you find that you have an individual's data on more than one row then
you have made a mistake. Equally, if a row contains more than one person's data, you have also made a
mistake.

Entering Variables

If you do not have repeated measures, SPSS Statistics treats each column as a separate variable.
Thus, each variable goes in a separate column. For example, if we had measured the height and weight of
a group of individuals, the data in SPSS Statistics would look like the following:

The Subject column has been


added so that it is clear that each individual is placed on a separate row. However, SPSS Statistics does
not need you to enter this column, and it is mostly for you to be able to better visualize your data. So,
even if we ignored the Subject column, we can see that one individual was 1.55 m tall and weighed 56
kg, looking at the Height and Weight columns, respectively.. To add more variables, simply add more
columns - one column per variable.

Defining Separate Groups

4
Separate groups are more commonly called between-subjects factors or independent groups. They
are groups where the individuals in each group are unique (i.e., no person is in more than one group). In
this sense, you could call the groups "mutually-exclusive". A common example is when differentiating
between gender. You want to label some of your individuals as female and others as male. To identify
which subjects were males and which were females, you need to create a "grouping variable" in SPSS
Statistics. This is a separate column that includes information on which group a subject belongs to. We do
this by labelling our groups numerically. For example, we label "males" as "1" and "females" as "2". By
using the value attribute we can label these numbers as representing males and females, respectively. An
example is shown below:

Looking at the columns on the left we can see that we have created a "grouping variable" called "Gender"

that has two categories: "1" and "2". Because we labelled the numbers using the value attribute we can
use the Value Label Button to switch to the text version of the "grouping variable" categories. In this
example, we can see that "1" and "2" are replaced by "Male" and "Female", respectively.

You do not need to add text labels – SPSS Statistics will work fine without them – but it can provide extra
clarity when analysing your data (especially as text labels are often used in the output instead of the
numbers – this helps greatly). We can see in this example that the first three subjects were males and the
last four subjects were females. What if you have more than two categories of your "grouping variable"?
Simple, just add more numbers with, we recommend, corresponding text labels.

Entering Repeated Measures

Repeated measures, also called within-subject factors or related groups, are variables that are measured
on more than one occasion. This can occur when you have measured the same subject for the same

5
variable at more than one time point or under more than one condition. For example, you measured body
weight at the beginning and end of a weight-loss programme. To enter this into SPSS Statistics, you must
ignore the "one-variable-one-column" rule and put each time point or condition in a new column as
follows:

Here, we have labelled their weight at the beginning of the weight-loss programme as " Weight_Pre" and
their weight after the weight-loss programme as "Weight_Post". It does not matter what you call these
"related" columns (you could have called them weight1 and weight2, for example), as long the columns
make sense to you. If you have a lot of time points and/or conditions, labelling the variables logically is
important because otherwise it can become very confusing determining which variable is which. This is
important as SPSS Statistics cannot tell the difference between columns that contain different variables
and columns that contain a repeated variable. Therefore, it cannot help you.

Multiple Separating Groups

Sometimes, such as when


running a two-way ANOVA
or when entering in your
whole study data, you need to
separate your subjects twice (i.e.,
on two separate variables).
For example, you need to

6
separate subjects by their gender (male/female) and their physical activity level (sedentary/active). This
will require two columns that act as "grouping variables", as shown below:

Here, we can see that, for example, Subject 1 was male and sedentary, and Subject 7 was female and
active. Notice that we are using the text labels as described earlier in this guide for added clarity.

Mixing Separate Groups and Repeated Measures

Sometimes, we have separated subjects into groups and then measured them repeatedly on the same
dependent variable. Such data might be analysed using a mixed ANOVA. If we had males and females
undertake a weight-loss programme and we weighted them pre- and post-intervention, we would have the
following setup in SPSS Statistics:

You might also like