You are on page 1of 13

SPSS INSTRUCTION

- CHAPTER 2

Using paper and pencil to draw frequency tables, crosstabulations, bar graphs and pie
charts does not pose much difficulty with small sample sizes and minimal variables.
However, in most cases, researchers have too much data to organize without the help of a

statistical software program such as SPSS.

Preparing Data in

SPSS

0bviously, before performing any sort of analysis in SPSS, the researcher must input his or
her data into the Data View screen and enter relevant information into the Variable View
screen as described in Chapter 1. Having done so, analyses can begin.
An option in SPSS worthy of specific mention in the context of measurements of frequency
is the "recode" firnction, which can separate values from a continuous variable into
artificially-created categories. One would, thus, use this function to establish the salary
categories used in Example 2.2 from the originally continuous salary data. Recoding data in

requires the following steps.


1. Select Transform from the options as the top of the Data View screen or the Variable
View screen. A pull-down menu should appear.
2. From the pull-down menu, select either "Recode into Same Variables" or "Recode
into Different Variables." The first of these options replaces the existing continuous
values with codes for the user-defined categories. The second option generates a
new variable that displays codes for the user-defined categories, leaving the raw
data in tact. A small window, identified by the choice of recoding into the same or

SPSS

3.

different variables, should appear.


An untitled box in the Recode into Same Variables or the Recode into Dffirent
Variables window contains the names of all variables for which data exists in the file.
Indicate the variable to recode by clicking on its name and then clicking on the
arrow to the right of the box. The name of the variable should disappear from its
original location.
a. If recoding into the same variable, the name of the variable should appear in the
box labeled "Numeric Variables".

ilra\t..W
r*-'"1'--"1

[&,nrsie Vili#rEe:

loKt
ry

lJA,R{Xffi1

r::::r1
t, rtet
Irr

-:aI

LI

W
[TlJ

t"ot*a

case

s#iffi

conflion)

z.LI - SPSS RECODE INTO SAME

VARIABLES WINDOW
'VAR00002"
Variables box indicates the researchers' desire to recode its
in
the
Numeric
The placement of
values. The "Old and New Values" button allows the researcher to define the new categories. The codes for the
will replace the original variable's values on the SPSS Data View page.
FIGURE

b.

(1) Click on the "old and new values" button below this box, to define the ranges
for each category ofdata. In the box that appears, specify each range ofraw
values for each category on the left and then, on the righ! assign a code to
that category, clicking "add" after entering each code.
(2) Upon competing the recoding process, click "Continue" to return to the
Recode into SameVariable window.
(3) Click "0K." The newly-created variable should appear on the Data View page
in place of the previously-existing variable.
If recoding into different variables, the name of the variable, followed by a
prompt for the user to supply a name for the newly-defined variable, appears in
the box labeled "Numeric Variable --> Output Variable."
ItrB(lict/ffitre ->&rittl \f**tt k:

l&ride

1**
L;:*lUg

t odqd,!k'ta,*;
I

fJ

t uuma

case sdedim

cm&ion)

FIGURE

2.I2 - SPSS RECODE INTO DIFFERENT VARIABLES WINDOW

lffiffiI|,=l:t#ki

The placement of "VAR00002" in the Numeric Variables box indicates the researchers' desire to recode its
values. The "Old and New Values" button allows the researcher to define the new categories. The codes for the
new categories will appear in a new column on the SPSS Data View page.

4.

(1)To the right of the Numeric Variable -> Output Variable box, the user must
supply a name for the newly-created variable.
[2) Click on the "old and new values" button below this box to define the ranges
for each category ofdata. In the box that appears, specifii each range ofraw
values for each category on the left and then, on the right assign a code to
that category, clicking "add" after entering each code.
(3) Upon competing the recoding process, click "Continue" to return to the
Recode into Dffirent Variable window.
( ) Click "Change." The newly-created variable should appear on the Data View
page in the column farthest to the right on the page.
Enter the coding scheme for the newly-defined variable in the "values" window on
the Variable View screen.

After organizing data, the user instructs SPSS to perform the desired statistical calculations
or create the desired table, graph, or chart. This resulting information appears on an output
screen for which SPSS generates a separate file from the data file. Thus, one who wishes to
save his or her output must remember to save both the data file, which generally has a .dat
extension, and the output file, which generally had an .spo extension.

Frequency Tables in

SPSS

create tables displaying category names, frequencies, and percentages. To do so,


the user must have entered the raw data into a column on the Data View screen and
recoded if necessary. For coded variables, coding scheme should exist in the "values"
window on the Variable View screen. Failure to enter the coding scheme results in output
that contains numerical codes rather than category names.
SPSS can

With data in place, the following steps instruct SPSS to create a frequency table.
L. Select Analyze from the options at the top of the Data View screen or the Variable
View screen. A pull-down menu should appear.
2. From the pull-down menu, select "Descriptive Statistics." A small window should
appear to the right of the selection.
3. Select "Frequencies" from the options in the window. A new window, entitled
Frequencies should appear.

FTGURE 2.13

SPSS FREQUENCIESWINDOW

The user creates frequency tables by selecting appropriate variables from those listed in the window above.

The "statistics," "charts," and "format" buttons provide options regarding the information included in the
table and alternative forms of presenting the data.

An untitled box in the Frequencies window contains the names of all variables for
which data exists in the file. Indicate the variable for which to create the frequency
table by clicking on its name and then clicking the arrow to the right of the box. The
name of the variable should disappear from its original location and appear in the
box labeled "Variable(s)." To create frequency tables for multiple variables, use the
same procedure with other variable names.
5. Click "OK."

4.

The output contains a small chart, entitled, "statistics" as well as one frequency table for
each variable placed into the "Variable[sJ" box in the Frequencies" window. The statistics
chart states the number of subjects who contributed data and the number with missing
data for the analysis. Along with the frequencies, themselves, the frequency tables contain

three percent values. The percent, itsell refers to the proportion all subjects who fall into
a particular category. However, researchers generally have the most interest in the other
two percentage values. The valid percent considers only the subjects who supplied data
for the relevant variable in determining the proportion of subjects within each category.
The cumulative percent, expresses an ongoing sum of the valid percents.
Example 2.23 - Frequency Table in SPSS
All of these values appear in the following output. The first frequency table uses the
categorical circus act data. The second table uses the artificially categorized salary groups.
Statistics
Act

N Valid I
Missing I

I
Ol

+o

+o
O

act

Freouencv

Valid

Stunt

Clown

I
I

acrobatics/strength
Animal
Sideshow
Other
Total

Valid Percent

Percent

Cumulative
Percent

15.0

15.0

15.0

22.5

22.5

37.5

60.0

22.5

22.5

12.5

12.5

72.5

22.5

22.5

95.0
100.0

5.0

5.0

40

100.0

100.0

salaries
Cumuldive

Valid

Valid Percent

Percent
7.5

10

25.O

25.O

14

35.0
30.0
2.5
100.0

35.0
30.0
2.5

Freouencv
$300-$449
$450-$599
$600-$749
$750-$899
900-$1049
Total

TABLE z.Lg,TABLE 2.20,AND TABLE

12
1

40

2.2t-

7.5

Percenf
7.5
32.5
67.5
97.5
't 00.0

'100.0

SPSS FREQUENCYTABLE

Frequenry table output always includes a Statistics summary table (Table 2.19), indicating the number of
values included in the analysis and the number of missing values. Table 2.20 and Table 2.21 appear as a rr
ofthe user requesting frequency tables for "act" and "salaries". The category names, appearing in the leftn
column of these tables use the terms entered into the "values" box on the Variable View screen.

Because of the arbitrary order of the categories in Table 2.20, pertaining to circus act, th

values in the cumulative percent column have little importance. However, the ascending
order of categories Table 2.27, pertaining to salaries, makes the cumulative percents
noteworthy. Using the cumulative percent column, one can easily determine the percent
subjects who earn less than those in a particular salary category and, by simply subtract
that value from 1000/0, the percent of subject who earn more than those in that category.

Crosstabulations in

SPSS

Crosstabulations, essentially, divide values from a frequency table according to a second


variable, Not surprisingly, then, the process of creating a crosstabulation in SPSS begins
with the same steps as does the process of creating a frequency table. The crosstabulatir
is created with the following steps.

Select Analyze from the options at the top of the Data View screen or the Variable
View screen. A pull-down menu should appear.
2. From the pull-down menu, select "Descriptive Statistics." A small window should
appear to the right of the selection.
3. Select "Crosstabs" from the options in the window. A new window, entitled
L.

Crosstab s should appear.


i"''ry"1

i*Ki

fow&):

gvAR{xxn}l

dv*neooo:

fiffiI

f,ohnmh):

i$dq*dl

f H#-l
tsr1d

t;--. - -j
i tlelliris i

_*_*_----.-J

lJe*

l,fl
I
*

EI gsay du*ercd barcfrarls


!flSrppresstaHes

ls@*:l fc"n'-,l TF",,.il


FIGURE 2.14

- SPSS CROSSTABUII\TIONS WINDOW

tlose listed in the box above' The


"statistics," "cells," and "format" buttons provide options regarding the information included in the

The user creates a crosstabulation by selecting appropriate variables from

crosstabulation and alternative forms of presenting the data'

untitled box in the Crosstabs window contains the names of all variables in the
file. Indicate the variable for which the categories should appear as rows in the
crosstabulation by clicking on its name and then clicking on the arrow to the left of
the box marked "Rows". The comparable procedure indicates the variable for which
categories should appear as columns. Use the "Layers" option for analyses with
more than two variables. For each variable identified and moved, the name of the
variable disappears from its original location and appears in the appropriate box'
To include percentages along with frequencies in the crosstabulation, click the
"cells" button at the bottom of the Crosstabs window. The Cell Display window that
appears includes a box in which the user can indicate whether he or she desires

4. An

5.

row, column, and total percentages.


6.

Click "OK."

If the user designates variables only into the row and column boxes, SPSS produces a

relatively uncomplicated two-variable crosstabulation. By default each cell contains the


frequency for the appropriate combination of categories. Cells do not contain percents
unless the user requests these values. (See Step 5 in the preceding directions.)
Example 2.24 - Basic Crosstabulation in SPSS
Instructing SPSS to create a crosstabulation based upon circus performers'acts and sexes,
including row, column, and total percentages, results in the following table.
sex * act Crosstabulation
Act
acrobatics/

sex

Male

female

Total

TABLE 2.22

stunt

Clown

strenoth

animal

sideshow

other

Total

20

% within sex

10.0o/o

20.0%

25.0o/o

15.0o/o

25.0o/o

5.0o/o

100.0%

% within act

33.3%

44.4o/o

55.6%

60.0%

s5.6%

50.0%

50.0o/o

% ofTotal

5.0%

10.0%

12.5%

7.5%

12.5o/o

2.5o/o

50.0%

Count

20

% within sex

20.Oo/o

25.0%

20.0%

10.0o/o

20.0o/o

5.0o/o

100.0%

% within act

66.7o/o

55.6%

44.4%

40.0%

44.4%

50.0%

50.0%

% ofTotal

10.Oo/o

12.5o/o

1O.Oo/o

5.0%

10.0o/o

2.s%

50.0%

Count

40

% within sex

15.0o/o

22.5%

22.5o/o

12.5%

22.5%

5.0%

100.0%

% within act

100.0%

100.0%

10O.Oo/o

100.0%

100.0%

100.0o/o

100.0%

% of Total

15.0%

22.5o/o

22.SYo

12.s%

22.5%

5.0o/o

1OO.Oo/o

Count

- SPSS TWO-VARIABLE CROSSTABUUITION

Each cell contains four values. The first value provides the frequency for the cell. The second value, refers to

the particular cell's percentage within that row (sex). The third value refers to the particular cell's percentage
within that column (actJ. The Iast value refers to that particular cell's percentage within the entire sample.

Table 2.22 displays SPSS's version of Table 2.7. Of course, without the instruction to
include percents within the cells, the crosstabulation would appear much less cumbersome
than Table 2.22 does,looking similar to table 2.3.

When the user enters a variable name into the "layers" box in the Crossfabs window, SPSS
automatically nests rows of the crosstabulation within the layers. Once again, each cell
contains the frequency for the appropriate combination of categories unless the user the
user requests percentages.

Example 2.25

- Nested Crosstabulation in SPSS

The following nested crosstabulation below utilizes the same variables as and, accordingly,
has a similar appearance to Table 2.10. As with Table 2.10,for the sake of simplicity, the
table contains only frequencies. Interestingly, though, unlike Table 2.10, the
crosstabulation created by SPSS does not display rows or columns that consistently have a
frequency of 0, Thus, no row appears for the income category of $900-$1049 in the male
layer of the following table.
salaries * act * sex Crosstabulation

salaries

acrobatics/
strenoth

clown

stunt
Male

Total

Act

Sex

sideshow

animal

stunt

other

$300-$449

$450-$599

$600-$749

0
4

2
5

20

20

$750-$899
Total
$300-$449

$450-$s99
$600-$749
$750-$899

900-$'t049
Total

2
2

2
0

SPSS NESTED CROSSTABULATION


TABLE 2.23
Categories of "male" and "female" appear as nested elements within each weekly salary category in the rows
of the crosstabulation. Marginal values for each act category appear at the end of the respective column'
Adding the values at the end of all rows marked "female" or "male" produces the marginal values for the

respective sex category.

Graphs and Charts in SPSS


The most obvious method of creating graphs and charts in SPSS uses the Graphs option at
the top of the Data View and Variable View pages. Choosing this option produces a pulldown menu containing the names of most graphs and charts available in the program.
However, other methods can create the same illustrations. The process of creating the
appropriate illustration varies based upon the graph or chart selected.
One who wishes to create bar graphs and pie charts might notice that the Frequencies

window provides users the option of including these illustrations with frequency table
output. Doing so, the user need only click on the "charts" button located at the bottom of
the page, then select the desired illustration and indicating whether it should display
frequencies or percentages. This process, however, can only produce basic graphs and
charts. One who wishes to produce nested or stacked illustrations should use the Graphs
option described. To maintain consistency all directions for creating graphs provided in

this chapter involve the use of the Graphs option. The bar graphs and pie charts already
provided in this chapter were created using this method.

Bar Graphs
Clicking on the Graphs option brings the names of three method of creating the graph to
the screen. Although all of these methods eventually produce similar illustrations, some
methods involve fewer steps than others do depending upon the particular graph desired.
The last of the methods listed, "Legacy Dialogues" generally proves the simplest method of
creating bar graphs. Beginning with the selection of this method, then, the following steps
describe the process of creating a basic (one-variable) bar graph.
From the pull-down menu under the Graphs option at the top of the Data View or
Variable View screen, select "Legacy Dialogues." A listing of graphs and charts
available through this method should appear.
2. Select "Bar." A window entitled Bar Charts should appear. The Bar Charts window,
by default identifies a simple bar graph as the desired illustration and summaries
for groups of cases as the data in the chart.
3. Click "Define." A new window, entitled. Define Simple Bar: Summaries for Groups of
Cases should appear.
1.

Ba: Heoa:ert

ff !l ofcarer
{}

Cth.

ll

fl

oErer

$*inic

! ^..,

() tdcaccs

Cm. Z

fkil

{e.9.. meur)

r:----:::'I

r--:-r|;'I r !."-Htif
r....-------------*l
I
i
...

hqgrcd,l

.....-_.

1....Ctran+*

ffiffi;i1

$t*i*,,....j

uJr_--,-l
,-

Panal

CatogoryAtiu

bf

l.,.1

:il Urc drat ryccmcairrrfom:


,

---_1".*3,,,*i
,--

FIGURE 2.1.5. SPSS SIMPLE BAR GRAPH WINDOW

llx$ v*llibl**. lr* +*q:il

i.*.'i.:.1.......i

cni.:mns'j

;rg-l
Im**j
l-

box
The user creates one-variable bar graph by selecting the appropriate variable from those listed in the
used
factor
comparison
above. The designation in the "Bars Represent" portion of the window identifies the

for the graph.

window contains the names of


all variables for which data exists in the file. Indicate the variable for which to
create the bar graph by clicking on its name and then clicking on the arrow to the
left of the box marked "CategoryAxis".

4. An untitled box in the Summaries for Groups

5.

of

Cases

Click "OK."

Example 2.26 - Bar Graph in SPSS


As mentioned, earlier portions of this chapter contain examples of SPSS-generated graphs
and charts. Basic bar graphs pertaining to the variable of circus act and salary category
appear as Figure 2.1 and Figure 2.2,respectively. I
Creating clustered and stacked bar graphs, require only small adjustments to the process
for creating the basic bar graph. A description of the process for doing so follows.
at the top of the Data View or Variable
View screen, select "Legacy Dialogues." A listing of graphs and charts available
through this method should appear.
Select "Bar." A window entitled Bar Charts should appear'

1. From the pull-down menu under the option


2.
3.

4.

Change the default selection

of "simple" in the Bar Charts window to "clustered" or

"stacked." Do not adjust the selection for data in the chart.


Click "Define." A new window, entitled. Define Clustered Bar: Summaries for Groups
of Cases or Define Stacked Bar: Summaries for Groups of Cases should appear.

Easfleprercrd'

* Ndcaaes
fiGxlt.f,l
ij^i Other

ddidic

f;j Ad.cases

*e*,3

{e.s., rican}

f.

ffir

i........................................................"......................1

Lha.'}*e:dfiis$c..

B.'d-l

{:"Jftb

-,1

re

Cdcgory&is:

[.Jm

IldrreCfu*ersbv:

Piltdbf

Ro*r*:

i*-l fde*.lx+i.Xges $* engptel*niru,l

Ttmplatc

I*

.I-il*

FIGURE

2.16.

1ll,:{nfiwei

LJte cft art

*ec#caims

firyn:

itr"*-l

SPSS CLUSTERED BAR GRAPH

WINDOW

The user creates clustered bar graph by selecting the appropriate variable from those listed in the box above.

The designation in the "Bars Represent''portion of the window identifies the comparison factor used for the
graph. The comparable box for a stacked bar graph appears identical to this one with the exception of the
request to define stacks rather than to define clusters.

5.

An untitled box in the Summariesfor Groups of Cases window contains the names of
all variables for which data exists in the file.
Indicate the variable for which frequencies should appear as bars graph by
clicking on its name and then clicking on the arrow to the left of the box marked
"Category Axis".
b. Indicate the variable by which to separate the data by clicking on its name and
then clicking on the arrow to the left of the box marked, "Define Clusters by" or

a.

"Define Stacks by."


6. Click "OK."

Example 2.27 - Clustered and Stacked Bar Graphs in SPSS


In the case of the circus data, circus act determines the category axis and sex serves as the
variable by which to define the clusters or stacks. Ordinarily SPSS distinguishes between

clusters by using different colors. However, Figure 2.3 and 2.4 utilize patterns rather than
colors to visually exaggerate the distinction. 1

Pie Charts
Creation of a pie chart begins the same way as creating a bar graph does, by selecting the
"Legacy Dialogues" option from the SPSS's Graphs menu. Steps for creating a basic (one-

variable) follow.

L. From the pull-down menu under the Graphs option


2.

3'

at the top of the Data View or


Variable View screen, select "Graphs." A listing of graphs and charts available
through this method should appear.
Select "Pie." A small window, asking the user to describe the data points appears.
Select "Summaries for Groups of Cases" and click Define. A window, entitled Define
Pie: Summaries for Groups of Cases, should appear.

vAflooool

ffiffi@

VAR{X}002

W_
fr:\

Ilcfhcslclcb,r:

[,ji-.r,,$;]i*d,1ffiffi@
FIGURE 2.17

- sPss DEFINE PIE: SUMMARIES oF GRoups oF cAsEs wINDow

The user creates one-variable pie chart by selecting the appropriate variable from those listed in the box
above. Clicking on the "pies," "titles," and "options" tabs allows for modifications to the chart's appearance.

4. An untitled box in the Define Pie: Summaries for Groups of Cases window contains the
names of all variables for which data exists in the file. Indicate the variable for
"Define Slices
which to create the pie chart dragging its name to the box marked

5.

by".
Click "OK.'

Example 2.28 - Basic Pie Chart in SPSS


preceding steps and
Figure 2.5 in this chapter contains the pie chart created using the
pie slices by
based upon the variable of circus act. ordinarily SPSS distinguishes between
to visually
using different colors. However, Figure 2.5 utilizes patterns rather than colors
exaggerate the distinction. I
of Cases
To create a paneled pie char! you also use the Define Pie: Summaries for Groups
you must
window. In addition to moving a variable name to the "Define Slices by" box,
move the
identiflr the categorical variable that serves as a basis for the panels. You should
"Panel by" portion of
name of this variable to either the "Rows" or the "Columns" box in the
vertically in its
the window. If you use the "Rows" box, SPSS will arrange the pie charts
in the SPSS
output. If you use the "Columns" box, the pie charts will appear horizontally

output.
Example 2.29 - Paneled Pie Chart in SPSS
to sex
Defining slices of the pie chart by circus act and paneling the data according
produces Figure 2.6 inthis chapter. As in the basic pie char! SPSS, unless directed
The patterns used in
otherwise, distinguishes between pie slices by using different colors'
Figure 2.6 merely serve to visually exaggerate this distinction. 1

You might also like