Chapter13-Using IBM SPSS Statistic
Chapter13-Using IBM SPSS Statistic
16
USING IBM SPSS
STATISTICS
CHAPTER OUTLINE
In order to implement the techniques that you learned in Chapter 15, you would need to do either of two
things: learn the underlying formula for each technique and apply your data to it, or use computer
software to analyse your data. The latter is the approach chosen in this book for two main reasons:
• it is closer to the way in which quantitative data analysis is carried out in real research nowadays;
You will be learning IBM SPSS Statistics, which is the most widely used package of computer software for
doing this kind of analysis. It is relatively straightforward to use. We will be continuing to refer to the
techniques introduced in Chapter 15 and will continue to use the gym survey as an example.
This chapter largely operates in parallel to Chapter 15, so that you can see the links between the
techniques learned there and the use of SPSS to implement them.
334 16 Using IBM SPSS statistics
Introduction
This chapter aims to provide a familiarity with some using SPSS to implement the methods of analysis dis-
basic aspects of SPSS for Windows, which is possibly cussed in Chapter 15.
the most widely used computer software for the anal- SPSS operations will be presented in bold, for exam-
ysis of quantitative data for social scientists. SPSS, ple, Variable Name: and Analyze. Names given to varia-
which originally was short for Statistical Package for bles in the course of using SPSS will be presented in bold
the Social Sciences, has been in existence since the italics, e.g. gender and reasons. Labels given to values
mid-1960s and over the years has undergone many or to variables are also in bold, e.g. reasons for visit-
revisions, particularly since the arrival of personal ing and male. Tips and skills ‘Basic operations in SPSS’
computers. It is now known as IBM SPSS Statistics and presents a list summarizing these. One further element
the version that was used in preparing this chapter was in the presentation is that a right-pointing arrow (➔) will
Release 24. The gym survey used in Chapter 15 will be be used to denote ‘click once with the left-hand button of
employed to illustrate SPSS operations and methods of your mouse’. This action is employed to make selections
analysis. The aim of this chapter is to introduce ways of and for similar activities.
• Compute. A procedure that allows you to combine two or more variables to form a new variable.
• Analyze. This is the point on the menu bar above the Data Editor from which you choose (via a dropdown
menu) which method of analysis you want to select. Note that, whenever an item on a menu appears with a
right-pointing arrowhead (➔) after it, this means that, if you select that option, a further menu will follow on.
• Graphs. This is the point on the menu bar above the Data Editor from which you choose (via a drop-down
menu) which chart you want to select.
• Chart Editor. When you produce a graph, you can edit it with the Chart Editor. To activate this editor,
double-click anywhere in the graph. A small chart editor window will appear and your main graph will appear
opaque until you exit the Editor. From the Editor, you can make various changes and enhancements to your
graph.
PLATE 16.1
The SPSS Data Viewer
PLATE 16.2
The Data Viewer with ‘gym study’ data entered
PLATE 16.3
The Variable Viewer
PLATE 16.4
The Value Labels dialog box
PLATE 16.5
The Missing Values dialog box
Designates 0 as the
missing value for the
variable in question
is accomp (has accomplished set goals), var00008 is interval/ratio variable such as var00002, which we will
othsourc (uses other sources of exercise beyond visiting give the variable name age. SPSS offers two choices:
the gym), var00009 is exercise (number of exercises), you can recode age so that it will be changed in the Data
var00010 is cardmins (minutes of cardio), var00011 Viewer, or you can keep age as it is and create a new vari-
is weimins (minutes of weights), var00012 is othmins able. This latter option is desirable whenever you want to
(minutes of other sport). preserve the variable in question as well as create a new
one. Since we may want to carry out analyses involving
age as an interval/ratio variable, we will recode it so that
Recoding variables a new variable, which we will call agegp, for age groups,
Sometimes you need to recode variables—for example, will be created. The aim of the following operations is to
when you want to group people. You would need to do create a new variable—agegp—which will comprise five
this in order to produce a table like Table 15.3 for an age bands, as in Table 15.3.
Getting started in SPSS 339
PLATE 16.6
The Recode into Different Variables dialog box
1. ➔Transform ➔ Recode into Different Variables … 3. ➔ the circle by System- or user-missing and by
[opens Recode into Different Variables dialog box System-missing under New Value, if you have miss-
shown in Plate 16.6] ing values for a variable, which is the case for this
2. ➔ age ➔ [puts age in Numeric Variable −> Output variable
Variable: box] ➔ box beneath Output Variable Name: 4. ➔ circle by Range, LOWEST through value: and
and type agegp ➔ Change [puts agegp in the Numeric type 20 in the box ➔ box by Value under New Value
Variable −> Output Variable: box] ➔ Old and New and type 1 ➔ Add [the new value will appear in the
Values … [opens Recode into Different Variables: Old Old −> New: box]
and New Values sub-dialog box shown in Plate 16.7]
PLATE 16.7
The Recode into Different Variables: Old and New Values sub-dialog box
340 16 Using IBM SPSS statistics
PLATE 16.8
The Compute Variable dialog box
5. ➔ first box by Range: and type 21 and in box after Computing a new variable
through type 30 ➔ box by Value under New Value
and type 2 ➔ Add A person’s total amount of time spent in the gym is made
up of three variables: cardmins, weimins, and othmins.
6. ➔ first box by Range: and type 31 and in box after
If we add these up, we should arrive at the total number
through type 40 ➔ box by Value under New Value
of minutes spent on activities in the gym. In so doing, we
and type 3 ➔ Add
will create a new variable totalmin. To do this, this pro-
7. ➔ first box by Range: and type 41 and in box after cedure should be followed:
through type 50 ➔ box by Value under New Value
and type 4 ➔ Add 1. ➔ Transform ➔ Compute Variable … [opens
the Compute Variable dialog box shown in Plate
8. ➔ circle by Range, value through HIGHEST and
16.8]
type 51 in the box ➔ box by Value in New Value and
type 5 ➔ Add ➔ Continue [closes the Recode into 2. under Target Variable: type totalmin
Different Variables: Old and New Values sub-dialog 3. from the list of variables at the left, ➔ cardmins
box shown in Plate 16.7 and returns you to the Re- [puts cardmins in box beneath Numeric Expression:]
code into Different Variables dialog box shown in ➔ +button ➔ weimins [puts weimins after +
Plate 16.6] sign] ➔ +button; ➔ othmins [puts othmins after
9. ➔ OK + sign]
4. ➔ OK
The new variable agegp will be created and will appear
in the Data Viewer. You would then need to gener- The new variable totalmin will be created and will
ate value labels for the five age bands and possibly a appear in the Data Editor.
variable label using the approach described above. Now at last, we can begin to analyse the data!
Data analysis with SPSS 341
PLATE 16.9
The Frequencies dialog box
PLATE 16.10
The Output Viewer with Frequency table
Note that in the Frequencies dialog box, variables that Generating a pie chart
have been assigned labels will appear in terms of their
variable labels, but those that have not been assigned To produce a pie chart like the one in Figure 15.3:
labels will appear in terms of their variable names. This 1. ➔ Graphs ➔ Chart Builder … [opens the Chart
is a feature of all dialog boxes produced via Analyze and Builder dialog box shown in Plate 16.12] ➔ Pie/
Graphs (see below). Polar below Choose from: and then ➔ the pie chart
format in the top left-hand corner of the Gallery and
Generating a bar chart drag and drop it into the area above it.
2. ➔ reasons for visiting from below Variables: and
To produce a bar chart like the one in Figure 15.2:
drag and drop into area marked in blue Slice by?]
1. ➔ Graphs ➔ Chart Builder … [opens Chart Builder 3. ➔ OK
dialog box shown in Plate 16.11]
In order to include percentages, as in Figure 15.3,
2. ➔ Bar below Choose from: and then ➔ the simple
double-click anywhere in the chart in order to bring up
bar format in the top left-hand corner of the Gallery
the Chart Editor. The chart will appear in the Chart
and drag and drop it into the area above it. Then ➔
Editor and the main figure will become opaque.
age and drag and drop in the same way as for a bar
Then ➔ Elements and then ➔ Show Data Labels.
chart.
This will place percentages in each slice as a default.
3. ➔ reasons for visiting from below Variables: and If you want the frequencies, ➔ Count in the Proper-
drag and drop into area marked in blue X-Axis? ties sub-dialog box that appears simultaneously (see
4. ➔ OK Plate 16.12).
PLATE 16.11
Creating a bar chart with the Chart Builder
Your chart will be in colour, but, if you want to print it 2. ➔ age ➔ to the left of Dependent List: [puts age in
and have access only to a monochrome printer, you can the Dependent List: box] ➔ Statistics under Display
change your pie chart into patterns, which allows the ➔ OK
slices to be clearer. This can be done through the Chart
The output will also include the 95 per cent confidence
Editor.
interval for the mean, which is based on the standard error
of the mean. The output can be found in Table 16.1. If you
Generating a histogram select Plots …, the Explore: Plots sub-dialog box will
come up and you can elect to generate a histogram. To
In order to generate a histogram for an interval/ratio vari-
do this, you will need to select either Both or Plots under
able such as age, ➔ Graphs ➔ Chart Builder … [opens
Display on the Explore dialog box. In addition, selecting
the Chart Builder dialog box shown in Plate 16.12] ➔
Both or Plots will produce two further types of figure, one
Histogram below Choose from: and then ➔ the histo-
of which is a boxplot, which was covered in Chapter 15.
gram format you prefer from the Gallery and drag and
drop it into the area above it. Then ➔ age and drag and
drop it in the same way as for a bar chart. This procedure
Generating a contingency table,
will generate a histogram whose age bands are defined
by the software. By double-clicking on the diagram, the
chi-square, and Cramér’s V
histogram can be edited using the Chart Editor. In order to generate a contingency table, like that in Table
15.4, along with a chi-square test and Cramér’s V, use the
Generating the arithmetic mean, following procedure:
TABLE 16.1
Explore output for age (SPSS output)
Explore
Cases
Descriptives
3. Make sure Observed in the Counts box has been se- Generating Pearson’s r and Spearman’s
lected. Make sure Column under Percentages has
rho
been selected. If either of these has not been selected,
simply click at the relevant point. ➔ Continue [closes To produce Pearson’s r in order to find the correlations
Crosstabs: Cell Display sub-dialog box and returns between age, cardmins, and weimins, follow these
you to the Crosstabs dialog box shown in Plate 16.13] steps:
4. ➔ Statistics … [opens the Crosstabs: Statistics sub- 1. ➔ Analyze ➔ Correlate ➔ Bivariate … [opens Bi-
dialog box shown in Plate 16.15] variate Correlations dialog box shown in Plate
5. ➔ Chi-square ➔ Phi and Cramér’s V ➔ Continue 16.16]
[closes Crosstabs: Statistics sub-dialog box and 2. ➔ age ➔ ➔ cardmins ➔ ➔ weimins ➔
returns you to the Crosstabs dialog box shown in [age, cardmins, and weimins should now be in the
Plate 16.13] Variables: box] ➔ Pearson [if not already selected]
6. ➔ OK ➔ OK
The resulting output can be found in Table 16.2. The resulting output is in Table 16.3.
If you have a table with two dichotomous variables, To produce correlations with Spearman's rho (ρ), follow
you would use the same sequence of steps to produce the same procedure, but, instead of selecting Pearson,
phi. you should ➔ Spearman instead.
Data analysis with SPSS 345
PLATE 16.13
The Crosstabs dialog box
Select and place here the variable that will make Select and place here the variable that
up the rows. This will be the dependent variable will make up the columns. This will be the
if it is possible and legitimate to make a independent variable if it is possible and
claim about likely causality legitimate to make a claim about likely causality
Click here to bring up the Crosstabs: Statistics Click here to bring up the Crosstabs: Cell Display
sub-dialog box (Plate 16.15) in order to select sub-dialog box (Plate 16.14) to select the
chi-square and other measures of association kinds of information that will be included in
that often accompany contingency tables each cell, such as column percentages
Generating scatter diagrams format which is in the top left-hand corner and drag
and drop into the area above the scatter diagram
Scatter diagrams, known as scatterplots in SPSS, are pro- formats
duced in the following way. Let us say that we want to plot
3. ➔ cardmins and drag and drop into area designated
the relationship between age and cardmins. There is a
Y-Axis? and ➔ age and drag and drop into area des-
convention that, if one variable can be identified as likely
ignated X-Axis? (see Plate 16.17)
to be the independent variable, it should be placed on the x
axis—that is, the horizontal axis. Since age is bound to be A scatter diagram in the default format is shown in Figure
the independent variable, we would follow these steps: 16.1. The scatter diagram can then be edited by bringing
up the Chart Editor by double-clicking anywhere in the
1. ➔ Graphs ➔ Chart Builder [opens the Chart Builder diagram. For example, the type and size of the markers
dialog box shown in Plate 16.17] can be changed by clicking anywhere in the chart in the
2. ➔ Scatter/Dot from below Choose from:. Then Chart Editor. This brings up a Properties sub-dialog
select from the scatter diagram formats, the basic box, which allows a variety of changes to the appearance
346 16 Using IBM SPSS statistics
PLATE 16.14
The Crosstabs: Cell Display sub-dialog box
of the diagram, such as colour and appearance of the Generating a contingency table with
points on the plot.
three variables
To create a table like that in Table 15.7, you would need
Comparing means and eta to follow these steps:
To produce a table like Table 15.5, these steps should be
1. ➔ Analyze ➔ Descriptive Statistics ➔ Crosstabs …
followed:
[opens the Crosstabs dialog box shown in Plate 16.13]
1. ➔ Analyze ➔ Compare Means ➔ Means … [opens 2. ➔ othsourc ➔ Independent List: by Row[s]
the Means dialog box shown in Plate 16.18] [othsourc will appear in the Row[s]: box]
2. ➔ cardmins ➔ to the left of Dependent List: 3. ➔ age3 [this is the name we gave when we created a
[puts cardmins in the Dependent List: box] ➔ rea- new variable with age recoded into three categories] ➔
sons for visiting ➔ to the left of Independent Independent List: by Column[s]: [age3 will appear
List: [puts reasons for visiting in the Independent in the Column[s]: box] ➔ gender ➔ Independent
List:box]➔ Options … [opens the Means: Options List: beneath Previous [gender will appear in the box
sub-dialog box] underneath Layer 1 of 1] ➔ Cells [opens Crosstabs:
3. ➔ Anova table and eta underneath Statistics for Cell Display sub-dialog box shown in Plate 16.14]
First Layer ➔ Continue [closes the Means: Options 4. Make sure Observed in the Counts box has been se-
sub-dialog box and returns you to the Means dialog lected. Make sure Column under Percentages has
box shown in Plate 16.18] ➔ OK been selected. If either of these has not been selected,
Further operations in SPSS 347
PLATE 16.15
The Crosstabs: Statistics sub-dialog box
simply click at the relevant point. ➔ Continue [closes The Save Data As dialog box will then appear. You
Crosstabs: Cell Display sub-dialog box and returns will need to provide a name for your data, which will
you to the Crosstabs dialog box shown in Plate 16.13] be placed after File name: We called the file ‘gym
5. ➔ OK study’. You also need to decide where you are going to
save the data—for example, onto a memory stick. To
The resulting table will look somewhat different from select the destination drive, ➔ the downward pointing
Table 15.7 in that gender will appear as a row rather than arrow to the left of Look in and then select the drive
as a column variable. and folder into which you want to place your data.
Then ➔ Save.
Remember that this procedure saves your data and
Further operations any other work you have done on your data—for exam-
ple, value labels and recoded variables. If you subse-
in SPSS quently use the data again and do more work on your
data, such as creating a new variable, you will need to
save the data again or the new work will be lost. SPSS
Saving your data will give you a choice of renaming your data, in which
You will need to save your data for future use. To do this, case you will have two files of data (one with the original
make sure that the Data Editor is the active window. data and one with any changes), or keeping the same
Then: name, in which case the file will be changed and the
➔ File ➔ Save As … existing name retained.
348 16 Using IBM SPSS statistics
TABLE 16.2
Contingency table for reasons for visiting by gender (SPSS output
Crosstabs
Cases
gender
Chi-Square Tests
a
2 cells (25.0%) have expected count less than 5. The minimum expected count is 4.20.
Symmetric Measures
All variables to be
correlated go here
TABLE 16.3
Correlations output for age, weimins, and cardmins (SPSS output)
Correlations
Correlations