You are on page 1of 55

SPSS v17

Introduction
to SPSS
Document No. IS-145
Contents
About SPSS and the course.....................................................................1
Starting SPSS 1
Getting help 2
Quitting SPSS 2
Data organisation and the Data Editor...................................................3
Opening a data fle 3
Terminology 4
Moving inside the Data ditor !
Types o" value #
Defning variables and entering data.....................................................8
Saving SPSS data..................................................................................10
Importing Ecel data fles.....................................................................11
Inserting! deleting and moving variables and cases............................1"
Sorting cases.........................................................................................1"
Selecting a subset o# data.....................................................................13
$abelling variables and values..............................................................1%
&issing values...................................................................................... 1'
(ecoding variables................................................................................1)
$e%oding string varia&les 1#
'utomati% $e%ode 1(
$e%oding data into %ategories 1)
*omputing ne+ data............................................................................."1
,he *ase Summaries command............................................................"3
,he -ie+er +indo+..............................................................................."%
Saving the output 24
Printing SPSS output 2!
,he .re/uencies command..................................................................."0
Descriptives.......................................................................................... "8
*rosstabulating data.............................................................................30
,he &eans command............................................................................33
, ,ests................................................................................................... 3%
*ndependent+Samples T Test 34
The Paired+Samples T Test 3!
*orrelation............................................................................................ 3)
(egression............................................................................................ 31
.urther graphics...................................................................................%0
Printing graphs 44
.urther reading2 boo3s and 4eb resources..........................................%0
,oo-s 4.
/e& resour%es 4.
1 Correlation
Introduction
This guide has &een prepared to help users 0ho 0ould li-e to learn ho0 to
%arry out statisti%al analyses in SPSS *t is assumed that you have the
re1uisite -ey&oard s-ills and -no0ledge o" a P2 in%luding fle handling and
data storage3 *t is also assumed that you are "amiliar 0ith /indo0s and -no0
ho0 to use a mouse3 Some -no0ledge o" &asi% statisti%al terms is desira&le to
&eneft "rom the %ourse3
About SPSS and the course
SPSS is a 0ell esta&lished statisti%al and data analysis program with a range o"
"a%ilities "or data manipulation and o4ers many pro%edures "or statisti%al
analysis3 The aim o" this %ourse is to provide a simple introdu%tion to SPSS "or
/indo0s3
The %ourse in%ludes a &asi% guide to %reating an SPSS fle and %reating5
re%oding and %omputing ne0 varia&les5 "ollo0ed &y &asi% analyti%al
%ommands to display simple des%riptive statisti%s5 "re1uen%ies5
%rossta&ulations5 means5 t+tests5 %orrelation and regression3 The produ%tion o"
simple graphi%s and dealing 0ith missing values 0ithin your data are also
%overed3
4A(5I56777
6i-e all statisti%al pa%-ages5 SPSS is 7ust a tool "or statisti%al and data analysis3
*t is very easy to produ%e results 0hi%h have no meaning at all8 ,e"ore
per"orming any statisti%al analysis 0ith this pa%-age it is strongly advised that
you ensure you have a good understanding o" the statisti%al pro%edures
involved3 *" ne%essary5 %onsult a good statisti%s te9t &oo- or an e9perien%ed
statisti%ian3
Starting SPSS
2li%- the Start &utton5 Programs5 the relevant so"t0are group5 SPSS5 and
%li%- on the SPSS i%on3
The initial SPSS s%reen should appear5 sho0ing the Data Editor 0indo05 0ith
the Data View 0indo0 on top5 and a ta& at the "oot o" the s%reen giving a%%ess
to the Variable View 0indo03 This is superimposed &y a smaller 0indo0
headed SPSS "or /indo0s 0hi%h you %an temporarily dis%ard &y %li%-ing on
the *ancel &utton3 :ou %an s0it%h &et0een Data View and Variable View &y
%li%-ing the appropriate ta&3
Regression 2
3 Correlation
Getting help
:ou %an o&tain help on SPSS at any time during your SPSS session3 ;eatures
su%h as &eing a&le to sear%h "or spe%if% topi%s are in%luded3 To a%%ess the
online help system5 %li%- on the 8elp menu and ,opics to display the
"ollo0ing 0indo0<
The Contents panel %ontains a list o" &road topi%s5 represented &y i%ons o"
&oo-s3 Dou&le+%li%-ing on any &oo- 0ill e9pand the %ontents3 Sele%ting any
one o" these topi%s &y dou&le+%li%-ing 0ill provide you 0ith the in"ormation in
that topi%3
*" you -no0 e9a%tly 0hat you 0ant5 or you 0ish to re"er to a statisti%al term or
a spe%if% pie%e o" 7argon5 you may pre"er to use the Index ta&3 'n alpha&eti%
list o" terms and topi%s 0ill appear5 and you %an enter a term to sear%h "or3 *"
too many similar topi%s are sho0n5 use the verti%al s%roll &ar to vie0 the rest
o" the list5 and dou&le+%li%- the topi% you 0ant3
=se Search to lo%ate a 8elp topi%3 /ithin the Search &o95 enter a -ey0ord that
you 0ould li-e to fnd help on3 'll 8elp topi%s that %ontain the -ey0ord 0ill &e
displayed5 not 7ust topi%s that &egin 0ith that 0ord >as in the Inde?3
Quitting SPSS
,e"ore 0e start loo-ing at data organisation5 it is important to -no0 ho0 to
e9it "rom SPSS3 The pro%ess is similar to 1uitting "rom most other /indo0s
appli%ations<
Sele%t .ile "rom the main SPSS menu &ar5 and then Eit3
SPSS 0ill as- you i" you 0ant to save any unsaved fles3 't this point there
should not &e any need to save any 0or-5 &ut %onsult the relevant se%tions o"
this 0or-&oo- on saving fles i" there are any open fles3
$estart SPSS so that you %an %ontinue 0ith the rest o" this 0or-&oo-3
Regression 4
Data organisation and the Data Editor
Opening a data file
The frst tas- 0ill &e to retrieve a simple data fle to see ho0 data is organised
0ithin SPSS3 To do this using the menu<
;rom the .ile menu5 sele%t 9pen5 then
sele%t the Data "rom the resulting su&+
menu3
The "ollo0ing dialog &o9 0ill appear<
*n the dialog &o9 pi%tured opposite5 you sele%t
the fle "rom the list o" fles3 :ou %an sele%t
di4erent drives and dire%tories &y %li%-ing the
drop+do0n arro0 ne9t to the Look in &o93
:ou %an retrieve fles %reated &y so"t0are pa%-ages su%h as 9%el &y sele%ting
one o" the fle types "rom the pull do0n list in the Files of Type &o93 This 0ill
&e %overed later in the %ourse3 The frst fle 0e are going to use is %alled
eer.sav3
Sele%t this fle and %li%- the 9pen &utton3
The Data View 0indo0 0ill %ontain the "ollo0ing data<
5 Correlation
!ariales


Terminology
The data used "or this e9ample is &ased on a survey on various types o" &eer3
The survey o&tained the "ollo0ing
in"ormation a&out ea%h o" the &eers<
the name o" the &eer
the al%oholi% %ontent >in per%ent?
i" the &eer %an &e %lassifed as @lightA
a%h o" these di4erent types o"
in"ormation is -no0n as a Variable in
SPSS and has &een given the name beer5
alcohol and light respe%tively3 a%h
varia&le %an &e seen running do0n a
%olumn5 "or instan%e5 in the "ollo0ing
e9ample<
The ro0s %ontain the
in"ormation "or ea%h
individual &eer tested3 The
in"ormation "or ea%h ro0 is
-no0n as a case"
a%h point o" data 0ithin a
%ell is a value3 ;or e9ample<
To summarise<
' case< is a single set o" data5 in this e9ample the details o" one parti%ular
&eer "rom the &eer survey3 Other e9amples o" a %ase are< one
reading "rom an e9periment5 the response "rom one person in a
1uestionnaire5 or a set o" e9am results "or one pupil at s%hool3
' variable< is a %olle%tion o" data o" the same type3 ;or instan%e5 in our
e9ample there are three varia&les 0hi%h are the &eer name5
al%ohol %ontent5 and 0hether the &eer is light or regular3 Other
e9amples o" varia&les are< the amount o" drug administered or the
Regression #
temperature in an e9periment5 the ans0er to a 1uestion in a
1uestionnaire5 or the mar-s "or maths and the names o" pupils in
s%hool e9ams3
' value< is a single item o" data 0hi%h is the interse%tion &et0een a %ase
and a varia&le3 *n our e9ample a value 0ould &e5 say5 the al%oholi%
%ontent "or the third &eer surveyed >e3g3 43)?5 0hether the f"th
&eer 0as light or regular5 or the name o" the 2B
th
&eer surveyed3
o!ing inside the Data Editor
Co0 that some data have &een retrieved5 you %an e9periment moving around
inside the Data ditor3 ;irst there are some points to note<
The %urrently sele%ted %ell has a thi%-er &orderD
the %ell value and %o+ordinates appear in the top le"t+hand %orner o" the
Data ditorD
the area 0hi%h sho0s the %urrent %ell value is also the area 0here ne0 %ell
values are 0ritten or edited &y typing in the ne0 value3
;or straight"or0ard data+entry<
=se the arro0 -ey to move a%ross varia&les "or the frst line o" dataD
use the ,ab -ey at the end o" the frst line to go to the se%ond lineD
then use the ,ab -ey to %ontinue 0ith the rest o" the data+entry3
7 Correlation
The "ollo0ing ta&le is a summary o" the -ey %ommands in SPSS "or /indo0s "or
re"eren%e3
"elpful hint#
in t$e tale %DE&'Data (ditor and %te)t&'*or all te)t.
$ey Plain Shift Ctrl Alt
;1 Eelp Menu+&ar help
;2 dit in %ell
(DE)
6a&el pop+up
(DE?
;3 Stop
pro%essor
;4 Tile
do%uments
2lose 0indo0 9it SPSS
;! Sear%h >te9t? $epla%e >te9t? 2as%ade Sear%h >data?
;. Ce9t 0indo0 Ce9t 0indo0
;# =se sets
;( 9tend
sele%tion
Multi+sele%tion
;1B
'%tivate men
u &ar
*nsert *nsertFOverty
pe
Paste 2opy
Delet
e
Delete 2ut
Eome ,eginning o"
line
Sele%t to
&eginning
;irst %ell (DE)
nd nd o" line Sele%t to end 6ast %ell (DE)
Pg=p Page up Sele%t up
PgDn Page do0n Sele%t do0n

2har right Sele%t right 6ast var >DE?

2har le"t Sele%t le"t ;irst var >DE?


=p Sele%t in drop+do0n

Do0n
Open drop+do0n list
s% 2an%el Tas- list Ce9t appli%ation
,-Sp
%
Del %har le"t =ndo >D?
Ta& Ce9t %ontrol Previous
%ontrol
Previous appli%ation
PrtS% S%reen
%apture
/indo0 %apture
Regression +
$ey Plain Shift Ctrl Alt
Spa%e G2li%-G
%ontrol
Sele%t %ase (DE)
Sele%t varia&le
(DE)
'ppli%ation %ontrol
menu
The other method o" navigating SPSS is to use the mouse<
:ou %an sele%t any visi&le %ell 0ith the mouse3
:ou %an use the horiHontal and verti%al s%roll &ars to vie0 areas o" the Data
ditor 0hi%h are not %urrently visi&le3
:ou %an sele%t various areas o" the Data ditor &y %li%-ing a parti%ular %ell5
and 0hilst holding the mouse &utton5 dragging the mouse %ursor over the
desired %ells3
:ou %an right+%li%- the mouse "or pop+up menus3
, Correlation
Types of !alue
*n the Data ditor you 0ill noti%e that the data %onsists o" &oth letters and
num&ers3 The values 0ithin the varia&le beer are all letters and are used "or
the names o" ea%h &eer3 The varia&le beer is -no0n as a string varia&le >or
string?3 ' string varia&le 0ill a%%ept most te9t input5 in%luding &oth letters and
num&ers3
The other t0o varia&les5 alcohol and light only %ontain num&ers3 These
varia&les are -no0n as nueric varia&les3 Cumeri% varia&les 0ill only a%%ept
num&ers >in%luding de%imal points? and 0ill not a%%ept any other type o"
%hara%ter3
One other point to note< the varia&le light only %ontains the values @BA and @1A3
This is &e%ause light is a categorical varia&le 0here the values @BA and @1A
represent regular beer and light beer respe%tively3 ' %ategori%al varia&le
ta-es a limited range o" levels or ran-s >ordinal? as opposed to a %ontinuous
varia&le >li-e alcohol? 0hi%h %an ta-e an indefnite range o" values3 Other
e9amples o" %ategori%al varia&les are days o" the 0ee-5 or a yesFno response
"rom a 1uestionnaire3 These are noinal varia&les3 The "ollo0ing ta&le sho0s
the di4erent types o" measurement5 0ith e9amples<
%ominal
*ategor: Discrete E:e colour
Ordinal $an-ing
>rating?
Dis%rete 6i-ert S%ale5 e3g3 1+!5 "or
e9ample<
9%ellent+good+"air+poor+
terri&le
Inter!al S%ale 2ontinuou
s
Temperature
&atio S%ale 2ontinuou
s
'ge5 years o" edu%ation
' %ategori%al varia&le %an &e a string varia&le or a numeri% varia&le &ut it is
re%ommended that %ategori%al varia&les should &e numeri% >see note &elo0?3
To summarise5 the t0o main types o" varia&les are string and numeri%3 :ou
%an also have other types o" varia&le 0hi%h in%lude dateFtime5 s%ientif%
notation and %urren%y varia&les3 These 0ill not &e %overed during this %ourse3
8elp#ul hint2
-ou .ill e unale to /er*orm man0 o* t$e SPSS commands .it$ string variales1 ecause strings contain
letters .$ic$ cannot e numericall0 anal0sed. It is recommended t$at1 .$ere /ossile1 0ou use a numering
sc$eme instead o* letters .$en coding and entering data1 e.g. use 213 *or 20es3 and 203 *or 2no3 instead o* 2Y3
and 2N3 i* 0ou $ave a -es4No t0/e 5uestion on a 5uestionnaire.
Regression 16
Defining !ariables and entering data
*n the "ollo0ing e9er%ise5 0e 0ill add a ne0 varia&le %alled rating to the data
fle3 a%h &eer 0as rated a%%ording to 1uality and 0as given a value as
"ollo0s<
1 I Jery good
2 I Good
3 I ;air
To start 0ith5 0e need to defne the ne0 varia&le<
ither %li%- on the -ariable -ie+ ta&5 or dou&le+%li%- on the 0ord var at
the top o" the "ourth %olumn >and s%roll up a little?3
*n the "ourth ro05 type the varia&le name rating in the 5ame %olumn >note<
all varia&le names are limited to ( %hara%ters?5 %li%- in the ,:pe %ell5 and
%li%- the grey &utton3 This opens the Variable Type dialog &o9<
This is 0here the varia&le type %an &e %hanged "rom numeri% to string i"
desired3 /e 0ant this varia&le to &e numeri%5 &ut the varia&le rating only
needs to &e o" length 1 0ith no de%imal pla%es3 To %hange this<
2hange the 4idth &o9 value to 1
2hange the Decimal Places &o9 value to 6
2li%- on the 9; &utton3
:ou have no0 defned the minimum amount o" in"ormation needed "or the
varia&le rating and %an no0 start entering the data3
11 Correlation
The ta&le &elo0 %ontains the values "or the varia&le rating "or ea%h &eer3 To
enter data<
13 2li%- on the Data -ie+ ta&3
23 Go to the frst %ase o" the varia&le rating5 and enter its value >i3e3 1?3
33 Press the Enter -ey 3 This 0ill enter the value and advan%e you to the
ne9t %ase3
43 $epeat this until all 3B values "or rating have &een entered3
Case 'eer &ating Case 'eer &ating
1 7iller 8ig$ 9i*e 1 1# Stro$s :o$emian St0le 2
2 :ud.eiser 1 17 7iller 9ig$t 2
3 Sc$lit; 1 1+ :ud.eiser 9ig$t 2
4 9o.enrau 1 1, Coors 2
5 7ic$elo 1 26 <l0m/ia 2
# 9aatts 1 21 Coors 9ig$t 2
7 7olson 1 22 7ic$elo 9ig$t 2
+ 8enr0 =ein$ard 1 23 Dos (5uis 2
, >ronenourg 1 24 :ec?s 2
16 8eine?en 1 25 >irin 2
11 @nc$or Steam 1 2# Scotc$ :u0 %Sa*e.a0& 3
12 <ld 7il.au?ee 2 27 :lat; 3
13 Sc$midts 2 2+ Rolling Roc? 3
14 Past :lue Rion 2 2, Past ()tra 9ig$t 3
15 @ugserger 2 36 8amms 3

The in"ormation "or fve more &eers %ame in and this data needs to &e added
to the data fle3 Go to the last %ase in the Data ditor and enter the "ollo0ing
in"ormation >you donAt need to enter the %ase num&ers?3
Case ( 'eer Alcohol light rating
31 8eilemans <ld St0le 4., 6 3
32 Auorg 5.6 6 3
33 <l0m/ia Bold 9ig$t 2., 1 3
34 Sc$lit; 9ig$t 4.2 1 3
35 St Pauli Birl 4.7 6 3
On%e all the data has &een entered you are ready to save the fle3
Regression 12
Sa!ing SPSS data
Co0 that you have entered your data into the SPSS Data ditor5 it is important
to save the data permanently3 ;rom the .ile menu either<
sele%t Save i" you 0ant to save the fle using the %urrent name5 or
sele%t Save As i" you 0ant to spe%i"y a di4erent fle name >0e 0ill do this "or
demonstration purposes?3
*" you sele%t Save As or i" you sele%t Save "or a ne0 data fle5 the "ollo0ing
dialog &o9 0ill appear<
/e are going to save the updated data in a fle %alled eer*ull.sav >you donAt
need to type the 3sav e9tension?5 so type this name in the .ile 5ame &o9
and %li%- on the Save &utton3
The updated fle should no0 &e saved 0ith the ne0 fle name3 :ou %an retrieve
this fle at any time using the pro%edure outlined on page !3
13 Correlation
Importing E)cel data files
Open a fle in the usual 0ay<
13 Sele%t 9pen "rom the .ile menu5 "ollo0ed &y Data3
This gives the "ollo0ing dialog &o9<
23 2li%- on the do0n+arro0 to the right o" the Files of type &o93
33 S%roll do0n and sele%t Excel <=.ls>3
43 Sele%t the drive5 "older and fle5 "or e9ample beerxls!xls and %li%- on the
9pen &utton3 This opens the 9pening Ecel Data Source dialog &o9<
!3 *" your spreadsheet has %olumn names at the start o" ea%h %olumn5 then
sele%t the Read variable names fro the "rst row of data option to -eep these as
the varia&le names in SPSS3 *" you leave this &lan-5 the 0hole spreadsheet
0ill &e imported3
.3 To import part o" a spreadsheet5 in the Range &o95 enter the range o" %ells
"rom the spreadsheet that you 0ant to import3 Spe%i"y the starting %olumn
letter and ro0 num&er5 a %olon and the end %olumn letter and ro0 num&er5
e3g3 '1<K143
#3 2li%- on the 9; &utton3
Regression 14
Inserting* deleting and mo!ing !ariables
and cases
Cormally ne0 varia&les appear to the right o" e9isting data in the Data ditor5
and ne0 %ases are added underneath the last %ase3 Eo0ever5 you may
sometimes pre"er to have them in a di4erent position5 0hi%h %an &e a%hieved
as "ollo0s<
*nserting a varia&le<
$ight+%li%- the varia&le name to the right o" the ne0 varia&le3
Sele%t Insert -ariables3
Deleting a varia&le<
$ight+%li%- the name o" the varia&le3
Press the &a%-spa%e -ey on the -ey&oard3
*nserting a %ase<
$ight+%li%- the %ase num&er &elo0 the ne0 %ase3
Sele%t Insert *ases3
Deleting a %ase<
$ight+%li%- the %ase num&er on the le"t o" the Data ditor3
Press the &a%-spa%e -ey on the -ey&oard3
Moving a varia&le<
2li%- the name o" the varia&le to &e moved3
Drag and drop the varia&le to the %olumn on the right o" the red line 0hi%h
appears3
Sorting cases
:ou may 0ish to sort your data in a di4erent order5 0hi%h you %an do as
"ollo0s<
13 ;rom the Data menu sele%t Sort *ases3 The "ollo0ing dialog &o9 opens<
23 Paste the varia&le on 0hi%h you
0ish to sort into the Sort b:
&o93
33 *" you 0ish to sort on another
varia&le 0ithin the spe%ifed
varia&le5 paste that a%ross5 and
so on3
43 *" you need to sort in
des%ending order %li%- Descending3
!3 2li%- on 9;.
15 Correlation
Selecting a subset of data
*n order to loo- at only the &eers rated very good5 i3e3 the varia&le rating
%oded 1 in the fle &eer"ull3sav<
;rom the Data menu sele%t the
option Select *ases to produ%e
the "ollo0ing dialog &o9<
The options displayed in the #elect
Cases dialog &o9 are as "ollo0s<
All cases< =ses all %ases in the
fle3
I# condition is satisfed< ' %ase is
sele%ted i" the e9pression is true3
(andom sample o# cases< Sele%t
either a spe%ifed num&er o" %ases
or a spe%ifed per%entage o" the
%ases at random3
?ased on time or case range: Pro%esses only those %ases "alling 0ithin a
range o" spe%ifed dates3
@se flter variable: :ou %an sele%t a numeri% varia&le to flter %ases3 2ases
are sele%ted 0hen the numeri% varia&le is not Hero or missing3
The &o9 entitled @nselected *ases Are gives the "ollo0ing options<
.iltered< This provides a s0it%h 0hi%h %an &e turned o4 to sele%t all %ases3
The s0it%h in this %ase is a varia&le %alled flterLM5 0hi%h has the value 1 i"
a %ase has &een sele%ted and the value B "or unsele%ted %ases3 'ny
su&se1uent analyses 0ill only &e per"ormed on those 0ith a flterLM value o"
13
Deleted< This option 0ill delete any unsele%ted varia&les3 ,e %are"ul in
%hoosing this option5 &e%ause saving the fle a"ter per"orming this %ould
mean that your data 0ill &e permanently lost3
2li%- on I# condition is satisfed "ollo0ed &y the &utton mar-ed I# to
produ%e the "ollo0ing dialog &o95 and type rating'1 into the e1uation &o9 on
the right to sele%t only these %ases<
Regression 1#
Click on the *ontinue button, followed by 9;3
To resume analysis on all cases, use Data | Select *ases again and click on All cases3
17 Correlation
+abelling !ariables and !alues
's varia&le names are limited to a ma9imum o" eight %hara%ters5 this
sometimes means that they are not very meaning"ul3 *t is possi&le to give
la&els to varia&les 0hi%h %an ma-e the names more meaning"ul3 /e %an also
la&el values so that the %oding system "or %ategori%al varia&les >e3g3 rating and
light in the &eer data? is more meaning"ul than 7ust relying on the num&ered
%odes3 6a&els are not initially visi&le 0ithin the Data ditor3 The main &eneft
o" la&elling is 0hen you produ%e statisti%al output5 0hi%h 0ill in%lude la&els
instead o" %odes 0here appli%a&le3
*n the "ollo0ing e9er%ise5 0e 0ill &e giving la&els to the t0o %ategori%al
varia&les 0ithin the data fle &eer"ull3sav5 so open this fle "rom the Training
;iles >COT the 'ns0ers?3
13 2li%- on the -ariable -ie+ ta& and %li%- in the $abel %olumn "or the
varia&le light and type 9ig$t or Regular3
23 2li%- in the -alues %olumn "or the varia&le
light5 then %li%- the grey &utton to the right
o" the %ell3 This opens the Value Labels
dialog &o9<
33 2li%- in the -alue &o9 and type 63
43 2li%- in the Value Label &o9 &elo0 and type
Regular3
!3 2li%- on the Add &utton3
The frst la&el 0ill &e added to the list &o93
.3 2li%- in the the Value &o9 again and type 13
#3 2li%- in the Value Label &o9 and type 9ig$t3
(3 2li%- on the Add &utton again3
)3 The %ompleted dialog &o9 should no0 loo-
li-e this<
*" there are any mista-es you %an sele%t the
la&el "rom the list >&y %li%-ing 0ith the
mouse? and %orre%t them &y %li%-ing on the
*hange &utton3
1B3 /hen you have fnished5 %li%- on 9;3
113 Per"orm the same pro%ess "or the varia&le rating3 The
la&els you should give are<
-ariable $abel2 Cualit0 o* :eer
-alue $abels2 1 D !er0 Bood
2 D Bood
3 D Eair
Regression 1+
123 On%e you have defned the la&els "or rating5 the Value
Labels dialog &o9 should loo- li-e this<
133 Save the fle3 This time you %an use the same name > i3e3
&eer"ull3sav?3
1, Correlation
issing !alues
There 0ill &e o%%asions 0hen5 "or one reason or another5 you 0ill have missing
values 0ithin your data3
;or instan%e5 in the "ollo0ing e9ample5 a survey 0as done in a shopping
pre%in%t to as- 3B shoppers 0hether or not they &elieved in Santa 2laus3 a%h
respondent 0as given an individual ID5 had their gender re%orded and 0as
as-ed "or their age and 0hether or not they &elieve in him3 Eo0ever5 during
the survey some people re"used either to give their age or say 0hether or not
they &elieved in him3
'll o" this in"ormation 0as re%orded in the fle santa3sav in%luding the missing
in"ormation 0hi%h had &een le"t &lan-3
To see ho0 SPSS %opes 0ith missing values<
13 Open the SPSS data fle santa3sav and loo- do0n the Data ditor to see
0here the missing values are >you should fnd missing values in %ases 45 125
145 2B5 23 and 2!?3
23 Sele%t the menus items Anal:Ae5 Descriptive Statistics and fnally
.re/uencies3
33 Sele%t age and believe and %li%- on the large arro0 pointing to the right5
and %li%- 9;3
*" you loo- at the output 0indo0 and use the s%roll &ar to vie0 the last part o"
the ;re1uen%ies ta&le "or the varia&le age5 you 0ill see the "ollo0ing<
The ;re1uen%ies ta&le "or the varia&le age displays the num&er o" %ases "or
ea%h age in the fle3 Eo0ever5 as %an &e seen "rom the a&ove5 SPSS has fve
%ounts o" missing ages3 The num&er o" missing %ases has also &een indi%ated
in the small ta&le at the top o" the output3
*" you do not enter a value "or a numeri% varia&le5 SPSS 0ill automati%ally
generate a missing value >sho0n in the Data ditor &y a dot?3
SPSS 0ill also generate a missing value i" it generates an invalid num&er 0hilst
%al%ulating data "or a ne0 varia&le >e3g3 dividing &y B?3
6etAs loo- at the ;re1uen%ies output "or the varia&le believe!
Regression 26

'elie!e in Santa,
2 #.7 #.7 #.7
17 5#.7 5#.7 #3.3
11 3#.7 3#.7 166.6
36 166.6 166.6

No
-es
Aotal
!alid
Ere5uenc0 Percent !alid Percent
Cumulative
Percent
's you %an see5 missing values have not &een indi%ated >there should &e t0o
missing values?3 *nstead SPSS interprets
spa%es as a%tual te9t values 0hen reading
te9t or string varia&les3
The missing values 0e have 7ust dis%ussed
"or the varia&le age are -no0n as #yste
$issing Values5 &e%ause the SPSS system has
interpreted the missing values that 0ay3
=sers %an spe%i"y %ertain values to &e
regarded as missing values i" re1uired5 0hi%h
0ill over%ome the pro&lem sho0n &y the believe varia&le5 0here spa%es are
read into string varia&les3 These missing values are -no0n as %ser $issing
Values3
*n order to enter missing values into the Data ditor 0e frst need to defne
0hat the missing values are going to &e3 /e 0ill start 0ith the varia&le age<
13 2li%- the -ariable -ie+ ta& in the Data ditor3
23 *n the ro0 "or age %li%- the %ell in the &issing %olumn3
33 2li%- on the grey &utton to produ%e the "ollo0ing &o9<
/e must de%ide 0hat value 0e are going to use as a missing %ode3 :ou
should al0ays %hoose a value that you -no0 0ill not o%%ur in the data3 ;or
the varia&le age 0e 0ill use B to represent a missing value5 as there is little
%han%e o" anyone responding 0ho has 7ust &een &orn3 *n this %ase5 you
%ould also use a negative value or a very large value3
't this point you %ould also de%ide to have several missing values or a
0hole range o" missing values3 ;or this e9ample5 ho0ever5 0e 0ill 7ust use
one missing value3
43 Ce9t5 %li%- on the option Discrete &issing -alues3
!3 *n the frst &o9 on the le"t type the value 63
.3 2li%- on *ontinue and then 9; to return to the Data ditor3
' missing value has no0 &een defned "or the varia&le age3 The pro%ess has
to &e repeated "or the varia&le believeD this time 0e 0ill use the letter N "or
missing3
#3 Open up the $issing Values &o9 as previously "or the varia&le believe3
(3 Sele%t Discrete $issing Values and enter F in the frst &o9 and return to the
Data ditor3
:ou %an no0 enter the missing values in the Data ditor3
)3 Go do0n the varia&les age and believe entering the values 6 and F
respe%tively 0herever you fnd a &lan- spa%e3
1B3 Sele%t the menu items Anal:Ae5 Descriptive Statistics,
.re/uencies and %li%- on 9; again5 to see ho0 SPSS 0ill %ope 0ith the
missing values no03
The &ottom o" the ;re1uen%ies output "or age no0 loo-s li-e this3 2ompare
this output 0ith the previous output "or system missing values "or age<
21 Correlation
The missing value is no0 indi%ated &y a B5 &ut overall there is not mu%h
di4eren%e in the output3
The ;re1uen%ies output "or the believe varia&le is as "ollo0s<
The num&er o" missing %ases is %orre%tly indi%ated at the &ottom o" the output
and the Valid &ercent %olumn is %orre%tly given3
Regression 22
'elie!e in Santa,
17 5#.7 #6.7 #6.7
11 3#.7 3,.3 166.6
2+ ,3.3 166.6
2 #.7
36 166.6
No
-es
Aotal
!alid
7issing 7issing
Aotal
Ere5uenc0 Percent !alid Percent
Cumulative
Percent
&ecoding !ariables
$e%oding varia&les is use"ul i" you 0ant to %onvert string varia&les to num&ers
or %ollapse or %om&ine your data into %ategories3 *t is possi&le to re%ode
values 0ithin e9isting varia&les or %reate ne0 varia&les %ontaining the
re%oded values o" e9isting varia&les3 /e 0ould re%ommend re%oding into a
ne0 varia&le 0herever possi&le5 so that your original values are retained3 *t is
also possi&le to re%ode on a %ertain spe%ifed %ondition3
&ecoding string !ariables
:ou should %ode varia&les numeri%ally 0here possi&le5 &ut i" you have fles
that %ontain %ategori%al string varia&les5 these %an &e re%oded3
*n the fle santa3sav the varia&le sex has &een %oded as M and ;3 /e %an
%hange these to 1 and B as "ollo0s<
;rom the .ile menu sele%t 9pen and Data and %hoose the fle santa3sav.
;rom the ,rans#orm menu
sele%t (ecode5 and then
Into DiBerent -ariables<
Paste sex into the Input
-ariable > 9utput
-ariable &o93
Type gender into the 9utput
-ariable 5ame &o93
2li%- on the *hange
&utton5 so that the dialog
&o9 no0 loo-s li-e this<
To defne the ne0 values 0hi%h
0ill &e re%oded<
13 2li%- on the 9ld and 5e+
-alues &utton to &ring up
the ne9t dialog &o9<
23 =nder 9ld -alue sele%t
-alue and type 73
23 Correlation
33 On the right5 under 5e+ -alue5 sele%t -alue and type 13
43 2li%- on the Add &utton3
!3 The old and ne0 values are sho0n3
.3 Ce9t5 under 9ld -alue5 sele%t -alue and type E3
#3 =nder 5e+ -alue type 63
(3 2li%- on the Add &utton3
)3 ;or string varia&les5 the missing values option does not apply5 &ut i"
numeri% varia&les are &eing re%oded and any missing values %odes have
&een spe%ifed >missing values 0ill &e %overed later in the %ourse? sele%t
the S:stemC or userCmissing option and then S:stemCmissing on the
right or a value 0hi%h you then defne as missing3 S:stemCmissing should
&e re%oded in the same 0ay3
1B3 *" you have any other values5 sele%t the option All other
-alues and add a ne0 value "or these or sele%t *op: old value<s>3
2ontinue the pro%edure until all varia&les you 0ish to re%ode have &een
entered 0ith their ne0 values3
113 To %hange the ne0 varia&le "rom string to numeri%
"ormat sele%t *onvert numeric strings to numbers &y %li%-ing in the
small &o9 a&ove the *ontinue &utton3
123 2li%- on *ontinue and then on 9;3
Automatic &ecode
:ou %an save time 0hen you 0ish to %onvert string varia&les &y using
'utomati% $e%ode3 This %reates a ne0 numeri% varia&le %ontaining
%onse%utive integers5 e3g3 15 25 35 et%5 to represent ea%h value in the original
varia&le3
;or e9ample5 in the fle santa3sav 0hi%h has the values M and ; "or male and
"emale in the varia&le sex5 these 0ill appear in the ne0 re%oded varia&le as 1
and 23
13 ;rom the ,rans#orm menu %hoose Automatic (ecode<
23 Paste a%ross the varia&le name to &e re%oded3
Regression 24
33 *n the small &o9 &elo05 %li%- and type in the name "or the ne0 re%oded
varia&le to &e %reated5 in this %ase gender' and %li%- the 5e+ 5ame
&utton3
43 $o+est value means that num&ers 0ill &e assigned in alpha&eti% order o"
the original values5 e3g3 "emale 0ill &e 15 and male 0ill &e 23 *" you 0ish the
%oding to &e in the reverse order5 %li%- on 8ighest value3
!3 2li%- on 9;3
' ne0 varia&le gender is %reated %ontaining the numeri% %odes 1 "or "emale
and 2 "or male5 as $o+est value 0as sele%ted3
&ecoding data into categories
*n the "ollo0ing e9ample5 in the fle santa3sav a ne0 varia&le agegrp is to &e
%reated5 &ased on the varia&le age! ;or instan%e up to 2! is age group 1D 2! to
!B is age group 2D and so on3 The initial dialog &o9 %an &e o&tained "rom the
menu options ,rans#orm5 "ollo0ed &y (ecode, then Into DiBerent
-ariables3
13 2li%- on the (eset &utton to %lear any %ontents in the &o9es3
23 The frst stage is to paste age into the &o9 Input -ariableD9utput
-ariable3
33 The name o" the ne0 varia&le >in this %ase agegrp? is typed into the 5ame
&o95 and a la&el i" re1uired5 is typed into the $abel &o93
43 '"ter %li%-ing on the *hange &utton the &o9 loo-s li-e this<
To defne the ne0 values 0hi%h 0ill &e re%oded to %reate the varia&le agegrp5
%li%- on the &o9 mar-ed 9ld and 5e+ -alues... 0hi%h 0ill &ring up the
dialog &o9 sho0n in the ne9t e9ample3
25 Correlation
*n the a&ove e9ample t0o %odings have already &een entered5 and %an &e seen
in the &o9 mar-ed
9ld CCE 5e+3
To enter a ne0 %oding5 do the "ollo0ing<
13 *n the 9ld -alue &o9 %li%- to sele%t the value5 missing or range type
re1uired3 Lowest means "rom the lo0est value in the fle5 and highest
means to the highest value in the fle3
23 *n the appropriate &o9 enter the value5 or the range o" values5 you 0ish to
&e re%oded3
33 *n the &o9 mar-ed (ew Value5 %li%- to sele%t -alue and type the ne0 value3
43 2li%- on the Add &utton to paste the %oding into the 9ld CCE 5e+ &o9.
!3 ;or string varia&les5 the missing values option does not apply5 &ut i"
numeri% varia&les are &eing re%oded and any missing values %odes have
&een spe%ifed >missing values 0ill &e %overed later in the %ourse? sele%t
the S:stemC or userCmissing option and then S:stemCmissing on the
right5 or a value 0hi%h you then defne as missing3 S:stemCmissing should
&e re%oded in the same 0ay3
To %opy all the remaining values a%ross to the ne0 varia&le<
13 2li%- on All other values3
23 2li%- on *op: old values5 and %li%- on the Add &utton3
*" you need to %onvert string values to numeri% values5 sele%t *onvert
numeric strings to numbers &y %li%-ing in the small &o9 a&ove the
*ontinue &utton3
33 2li%- on *ontinue and then %li%- on 9;3
*" you 0ant to re%ode on a %ertain spe%ifed %ondition5 %li%- on the I# &utton in
the initial (ecode into DiBerent -ariables dialog &o93 This 0ill ta-e you to
the I# *ases dialog &o95 0here you %an spe%i"y the appropriate %ondition &y
sele%ting Include i# case satisfes condition and pasting in the varia&le
name and the numeri% e9pression spe%i"ying the %ondition3
Regression 2#
Computing ne- data
*t is possi&le to %ompute a ne0 varia&le 0ithin SPSS &ased on e9isting
varia&les3 Ce0 varia&les %an &e %omputed &y using mathemati%al e9pressions
andFor various &uilt+in "un%tions3
/e 0ill illustrate these &y %al%ulating the mean o" the three e9am results "or
ea%h pupil in the fle results3sav in t0o di4erent 0ays3
13 Open the fle results3sav3
23 Sele%t the menu option ,rans#orm5 "ollo0ed &y *ompute3 to open the
"ollo0ing dialog &o9<
On the le"t you %an see a list o" the %urrent varia&les3 Oust a&ove the varia&les
&o9 is an area 0here the name o" the ne0 varia&le to &e %omputed is 0ritten
>%alled Target Jaria&le?3 9isting varia&les %an &e pasted into the (ueric
Expression &o9 on the top right3
The e9pression is &uilt up &y adding numeri%al operations to the &o9 using the
%al%ulator+li-e pad5 or &y pasting in one o" the "un%tions in the list on the
right+hand side3
;irst 0e 0ill %ompute a ne0 varia&le %alled resean) 0hi%h uses the
e9pression >english P history P aths?*+ to %ompute the varia&le3
33 Type a ne0 varia&e name resmean1 into the Target Variable &o93
43 2li%- on the <> &utton in the %al%ulator pad >&ra%-ets?3
!3 Type or paste in the e9pression englis$ G $istor0 G mat$s inside the &ra%-ets3
.3 Type or paste in ./ on the right5 outside the &ra%-ets3
:ou should have something li-e
this<
#3 2li%- on 9;3
27 Correlation
' ne0 varia&le resean) has &een %reated in the Data ditor and appears on
the right a"ter all the other varia&les in the fle3
/e 0ill no0 %ompute a ne0 varia&le %alled resean, 0hi%h is again the mean
o" all three results5 &ut this time 0e use a di4erent %al%ulation3 /e use the
SPSS "un%tion MEAN>english5 history5 aths? "or the %omputation3
13 Sele%t the menu options ,rans#orm5 *ompute3
23 2li%- on the (eset &utton to %lear the %ontents o" the &o9es3
33 Type resmean2 into the Target Variable &o93
43 S%roll do0n the Functions &o9 to fnd the "un%tion
MEAN>nume9pr5nume9pr5333?
!3 2li%- on this "un%tion and %li%- on the large arro0 pointing up0ards3
.3 Delete all o" the %ontents inside the "un%tions &ra%-ets3
#3 Type or paste englis$1$istor01mat$s inside the &ra%-ets3
:ou should have something
li-e this<
(3 2li%- on 9;.
:ou 0ill see that the ne0 varia&le resean, has &een %reated to the right o"
resean) in the Data ditor3
/e %an similarly %ompute a ne0 varia&le %alled highest to %ompute the largest
result that ea%h pupil o&tains >Eint< there is a "un%tion %alled M'N?3
'"ter you have %omputed the ne0 varia&les5 save the fle as res%omp3sav3
Regression 2+
The Case Summaries command
The 2ase Summaries %ommand allo0s you to display some or all o" the data
"rom your fle3 *t allo0s you to %hoose 0hi%h varia&les to display5 and i" desired
you %an also group %ases a%%ording to some varia&le3 The output is a 0ell+
"ormatted display o" your data5 0hi%h
you may 0ish >"or e9ample? to
in%lude in a report3
To list the %ontents o" the fle<
13 Open the fle &eer"ull3sav3
23 Sele%t the Anal:Ae menu on the
menu &ar3
33 Sele%t the (eports menu option3
This 0ill produ%e a se%ond su&+
menu3
43 ;inally5 sele%t the *ase
Summaries option to display the
"ollo0ing dialog &o9<
The varia&les to &e listed need to &e
sele%ted "rom the list on the le"t and &e pla%ed in the list on the right3 To do
this<
13 Sele%t the frst varia&le5 alcohol5 so that it is highlighted3
23 2li%- on the large arro0 pointing to0ards the Variables panel3 The varia&le
alcohol is trans"erred to the list on
the right as sho0n<
>5ote2 The dire%tion o" the large
arro0 has %hanged 0hi%h means that
you %ould remove the varia&le
alcohol "rom the list3?
To list all the %ases you %ould sele%t ea%h varia&le in turn and paste it into the
list5 &ut this might &e time %onsuming3 'lternatively<
2li%- on the top varia&le in the list >i3e3 beer? and drag the mouse do0n the
list until all the varia&les are
highlighted5 and then %li%- on the
large right arro03
'll the varia&les 0ill &e pasted in
the list3
/hen you are ready to pro%eed5
%li%- on the 9; &utton3
The 9utput -ie+er 0indo0 0ill &e%ome the a%tive 0indo0 and sho0 a "ull
listing o" the data3 :ou %an vie0 the %ontents o" the output 0indo0 in "ull &y
using the %ursor -eys Page@p5 PageDo+n or the mouse and s%roll &ar3
*nstru%tions on ho0 to save and print "rom the Viewer window 0ill &e given
later3
2, Correlation
The 0ie-er -indo-
The -ie+er 0indo0 is 0here all the results "rom any analyses you per"orm
0ill &e produ%ed3 This se%tion 0ill dis%uss ho0 you %an save and print the
results "rom the -ie+er 0indo03 The "ollo0ing e9ample sho0s 0hat the
-ie+er 0indo0 loo-s li-e<
The in"ormation %ontained in the -ie+er 0indo0 %an &e %opied into a 0ord
pro%essor or te9t editor3 'lternatively5 editing %an &e done 0ithin the -ie+er
0indo03
The &uttons on the i%on &ar 0ill not &e dis%ussed 0ithin the %ourse3 Eo0ever5
you %an %onsult the 8elp se%tion on i%on &ars i" you 0ish to fnd out more
a&out the &uttons on the i%on &ar3
Sa!ing the output
Saving the SPSS output is a similar pro%ess to saving SPSS data5 0ith a "e0
di4eren%es3
/ith the -ie+er 0indo0 as the %urrent 0indo05 "rom the .ile menu either<
sele%t Save i" you 0ant to save the fle using the %urrent fle name5 or
sele%t Save As i" you 0ant to spe%i"y a di4erent fle name >0e 0ill do this
"or demonstration purposes?3
*" you sele%t Save As or i" you sele%t Save "or a ne0 output fle5 a dialog &o9
similar to the Save Data dialog &o9 0ill appear3 'gain5 li-e other dialog
&o9es used "or fle operations5 the Save As dialog &o9 allo0s you to %hoose
the drive5 dire%tory or an e9isting fle name3 /e are going to save the output
using the fle name eer1.s/o so type this into the File (ae &o9 and %li%- on
the Save &utton3
The updated fle should no0 &e saved 0ith the ne0 fle name3 :ou %an retrieve
this fle &y sele%ting the menu options .ile D 9pen Q 9utput and then
sele%ting the fle using a pro%edure similar to the one outlined on page !3
Regression 36
Printing SPSS output
/ithin SPSS you have the %hoi%e to print either a sele%tion or all o" the output3
To print all o" the output<
13 Ma-e sure that the -ie+er 0indo0 is the %urrent 0indo03
23 Sele%t the menu option .ile5 "ollo0ed
&y Print to produ%e the "ollo0ing
dialog &o9<
't this point you %an ensure that the printer is set up %orre%tly &y %li%-ing
on the Properties &utton5 although this shouldnAt &e ne%essary at the
moment3 :ou %an also in%rease the num&er o" %opies i" desired3
33 2li%- on 9; 0hen you are ready to print3
43 The output 0ill &e sent to the sele%ted printer3
To print a sele%ted part o" the output<
13 Eighlight the desired area o" the output3 This %an &e done &y %li%-ing on%e
on a ta&le o" results or a graph3 ;rom the menu sele%t .ile D Print3
23 Sele%t the option mar-ed Selection3
33 2li%- on 9; 0hen the other options are set3
43 This time only the sele%ted output 0ill &e printed3
31 Correlation
The 1re2uencies command
The ;re1uen%ies %ommand is used to report on the "re1uen%y distri&ution o"
the data5 and %an produ%e graphi%al output su%h as &ar %harts and
histograms3 This e9ample uses the &eer data3 The ;re1uen%ies %ommand %an
&e "ound under the Anal:Ae D Descriptive Statistics menus3
*n this e9ample 0e 0ill use "re1uen%ies to %ount the num&er o" o%%urren%es
0ithin the su&groups o" the varia&le rating3
13 Sele%t the menu Anal:Ae5 then Descriptive Statistics D .re/uencies3
23 The ;re1uen%ies dialog &o9 0ill
appear<
33 Paste the varia&le rating into the
Variable-s. &o9 and %li%- on 9;.
The output "or the varia&le rating is sho0n &elo0<
The num&er o" o%%urren%es "or ea%h rating is sho0n in the a&ove output
in%luding the per%entages o" the sampled population3 ;or instan%e5 14
&eers 0ere rated as /ood5 0hi%h is 4BR o" all o" the sampled &eers3
6i-e most other %ommands in SPSS5 the ;re1uen%ies %ommand has e9tra
options5 0hi%h in%lude &eing a&le to produ%e des%riptive statisti%s and high
resolution graphi%s3 *n the ne9t e9ample 0e
0ill add options on the ;re1uen%ies
%ommand "or rating to produ%e a &ar %hart
o" the data3
43 Produ%e the ;re1uen%ies dialog &o9 again3
!3 2li%- on the *harts &utton3
The Charts &o9 0ill appear<
.3 Sele%t the ?ar charts option and %li%- on
*ontinue3
#3 2li%- on 9; in the Fre0uencies dialog &o93
Regression 32
Quality of 'eer
11 31.4 31.4 31.4
14 46.6 46.6 71.4
16 2+.# 2+.# 166.6
35 166.6 166.6
!er0 Bood
Bood
Eair
Aotal
!alid
Ere5uenc0 Percent !alid Percent
Cumulative
Percent
The ;re1uen%ies %ommand 0ill run the same as &e"ore5 &ut is "ollo0ed &y a
&ar %hart<
Cualit0 o* :eer
Cualit0 o* :eer
Eair Bood !er0 Bood
E
r
e
5
u
e
n
c
0
1#
14
12
16
+
#
4
2
6
The &ar %hart pi%tured in the a&ove e9ample sho0s graphi%ally ho0 the &eers
are rated5 displaying a %ount o" ea%h o" the %ategories 0ithin the varia&le
rating3 *t is possi&le to produ%e the same graph sho0ing per%entages instead
o" "re1uen%ies3 ' histogram %an &e produ%ed "or %ontinuous data3
33 Correlation
Descripti!es
The Descriptives %ommand 0ill %al%ulate &asi% statisti%s in%luding means5
varian%e5 standard deviation5 ma9imum and minimum3 This is used mainly on
%ontinuous varia&les5 &ut %an &e used on s%ales o" fve points or more3
To %al%ulate des%riptives on the &eer data5 ma-e sure the fle &eer"ull3sav is
open5 and do the "ollo0ing<
13 Sele%t the Anal:Ae menu option3
23 Sele%t the su&+menu Descriptive Statistics "ollo0ed &y Descriptives3
The "ollo0ing dialog &o9 0ill appear<
33 Paste all three varia&les into the Jaria&le>s? &o9 >i3e3 highlight all three
varia&les and %li%- on the large right arro0?3 5ote< :ou %annot sele%t the
varia&le beer &e%ause it is a string varia&le and there"ore does not have
num&ers on 0hi%h to do %al%ulations3
43 2li%- on 9;3
The "ollo0ing ta&le 0ill appear in the Output Jie0er dialog &o9<
The de"ault statisti%s sho0n in the ta&le are the mean5 standard deviation5
minimum and ma9imum values5 and the num&er o" %ases >N?3
'lthough statisti%s have &een produ%ed "or the varia&les rating and light
the values are not very meaning"ul &e%ause the num&ers in these varia&les
are %ategori%al3 The values are not a 1uantitative measure &ut are used to
%lassi"y the data into groups >i3e3 the rating tells us i" the &eer is very good5
good or 7ust "air?3
Regression 34
*t is possi&le to produ%e other univariate statisti%s using the Des%riptives
%ommand3
13 Open up the Descriptives dialog &o9 >i3e3 sele%t the menu options Anal:Ae D
Descriptive Statistics D Descriptives?3 The
dialog &o9 0ill appear 0ith all the varia&les
previously sele%ted in the Variable-s. &o93
23 2li%- on the 9ptions &utton3 The "ollo0ing &o9
0ill appear<
This sho0s various options 0hi%h %an &e sele%ted
to produ%e additional statisti%s3 ;or this e9ample
0e 0ill re1uest the s-e0ness and -urtosis options
only5 0hi%h give an indi%ation o" ho0 %lose to the
normal distri&ution your data is3 Kurtosis sho0s
0hether the %urve is steeper than the @CormalA
&ell+shaped %urve >positive? or Satter >negative?D
s-e0ness sho0s i" it leans to the right >negatively s-e0ed? or to the le"t
>positively s-e0ed?D &oth o" these are &eyond the normal range i" they are
appro9imately greater than 1 or less than I13
Desele%t the &ean5 Std Deviation5 &inimum and &aimum &o9es3
Sele%t the ;urtosis and S3e+ness options3
2li%- on *ontinue to return to the initial Descriptives dialog &o93
,e"ore %ontinuing 0e should remove the varia&les light and rating "rom the
analysis as they are %ategori%al varia&les and 0ill not produ%e meaning"ul
results3
Eighlight the varia&les light and rating in the Variable-s. &o93
2li%- on the large arro0 pointing le"t3
2li%- on 9;.
The results produ%ed no0 loo- li-e this<
This time the -urtosis and s-e0ness values "or 7ust the varia&le alcohol have
&een produ%ed3 These are not %lose to B5 indi%ating that a normal distri&ution is
unli-ely3
35 Correlation
Descripti!e Statistics
35 -2.246 .3,+ #.445 .77+
35
@9C<8<9
!alid N %list.ise&
Statistic Statistic Std. (rror Statistic Std. (rror
N S?e.ness >urtosis
Crosstabulating data
Sometimes you might 0ant to -no0 the relationships &et0een t0o %ategori%al
varia&les3 ;or instan%e5 0ith the results data5 ho0 do the "emales %ompare
0ith the malesT The 2rossta&s %ommand %an &e used to %ount the num&er o"
%ases "or ea%h %om&ination o" values "or the varia&les class and sex! To
per"orm a %rossta&ulation<
2all up the Crosstabs dialog &o9 &y sele%ting the menu options Anal:Ae D
Descriptive Statistics D *rosstabs3
The Crosstabs dialog &o9 0ill appear
as sho0n in the ne9t e9ample<
Paste the varia&le sex into the
Colun-s. &o9 and the varia&le class
into the 1ow-s. &o9 and %li%- on 9;.
The output "or the 2rossta&s %ommand
"ollo0s<
Class 3 Se) Crosstabulation
Count
16 16
5 5 16
16 16
15 15 36
Class @
Class :
Class C
Class
Aotal
7ale Eemale
Se)
Aotal
The 2rossta&s %ommand organises the data into a ta&le3 The %ross+point
&et0een ea%h response o" the t0o varia&les is %alled a %ell >e3g3 1B "emales in
2lass '5 &ut no males?3
The totals at the side and the &ottom o" the ta&le sho0 the "re1uen%ies 0ithin
one varia&le5 e3g3 overall5 there 0ere 1B pupils in ea%h %lass5 and 1! o" ea%h
se93 The &ottom right %orner sho0s the totals "or the 0hole ta&le3
The 2ells su&%ommand has options to in%lude the per%entages "or the ro05
%olumn and 0hole ta&le5 as 0ell as the e9pe%ted and residual values "or ea%h
%ell3
The ne9t e9ample uses the %ommand previously &uilt to produ%e e9tra values
"or the ro05 %olumn and total per%entages5 and also the e9pe%ted values3
13 2all up the 2rossta&s dialog &o9 again3 The same varia&les 0ill remain
sele%ted3
23 2li%- on the *ells &utton to produ%e the
"ollo0ing &o9<
33 Sele%t the "ollo0ing &o9es< 9pe%ted5 $o05
2olumn and Total3 Then %li%- on *ontinue and
9;3
Regression 3#
Class 3 Se) Crosstabulation
6 16 16
5.6 5.6 16.6
.6H 166.6H 166.6H
.6H ##.7H 33.3H
.6H 33.3H 33.3H
5 5 16
5.6 5.6 16.6
56.6H 56.6H 166.6H
33.3H 33.3H 33.3H
1#.7H 1#.7H 33.3H
16 6 16
5.6 5.6 16.6
166.6H .6H 166.6H
##.7H .6H 33.3H
33.3H .6H 33.3H
15 15 36
15.6 15.6 36.6
56.6H 56.6H 166.6H
166.6H 166.6H 166.6H
56.6H 56.6H 166.6H
Count
()/ected Count
H .it$in Class
H .it$in Se)
H o* Aotal
Count
()/ected Count
H .it$in Class
H .it$in Se)
H o* Aotal
Count
()/ected Count
H .it$in Class
H .it$in Se)
H o* Aotal
Count
()/ected Count
H .it$in Class
H .it$in Se)
H o* Aotal
Class @
Class :
Class C
Class
Aotal
7ale Eemale
Se)
Aotal
The third ro0 in ea%h %ell gives the per%entage o" all %ases in a ro0 that "all
into that %ell3 ;or instan%e5 1BBR o" pupils in 2lass ' 0ere "emales3
The "ourth ro0 in ea%h %ell gives the per%entage o" all %ases in a %olumn that
"all into that %ell3 ;or instan%e5 ..3#R o" "emales 0ere in 2lass '3
The f"th ro0 in ea%h %ell gives the per%entage o" all the %ases in the ta&le that
"all into that %ell3 ;or instan%e5 33R o" all pupils 0ere in 2lass '3
*t is also possi&le to display various statisti%s "or the %rossta&ulation in%luding
the %hi+s1uare statisti% and its
signif%an%e level3 To do this<
2li%- on the Statistics &utton to
produ%e the dialog &o9<
Sele%t *hiCs/uare &y %li%-ing in the
small &o9 at the top le"t3
2li%- on *ontinue5 and then on 9;3
37 Correlation
The "ollo0ing additional ta&le appears<
Chi4S2uare Tests
26.666
a
2 .666
27.72# 2 .666
1,.333 1 .666
36
Pearson C$i-S5uare
9i?eli$ood Ratio
9inear-0-9inear
@ssociation
N o* !alid Cases
!alue d*
@s0m/. Sig.
%2-sided&
6 cells %.6H& $ave e)/ected count less t$an 5.
A$e minimum e)/ected count is 5.66.
a.
The %hi+s1uare signif%an%e level sho0s 0hether you %an re7e%t the null
hypothesis that there is no asso%iation &et0een the t0o %ategori%al varia&les3
*" too many %ells have lo0 e9pe%ted values a%%ording to the "ootnote5 it 0ill &e
ne%essary to group %ategories5 "or instan%e &y using $e%ode3
' %lustered &ar %hart sho0ing the same in"ormation graphi%ally %an &e
produ%ed &y sele%ting Displa: clustered bar charts3
'lso5 it is possi&le to add another varia&le in the last 0indo0 to produ%e
e4e%tively a three+0ay %rossta& giving a t0o+0ay ta&le "or ea%h level or
%ategory o" this varia&le3 This is illustrated in the e9er%ise3
Regression 3+
The eans command
This %ommand %an &e used to fnd the means and standard deviations o" one
or more %ontinuous varia&les "or su&+populations in a sample3 ;or instan%e
0ith the &eer data5 you might 0ant to -no0 the mean al%ohol value "or ea%h
di4erent rating o" &eer3 To do this<
13 Sele%t Anal:Ae Q *ompare &eans Q &eans to produ%e the dialog &o9<
23 Paste the varia&le alcohol into the Dependent $ist3
33 Paste the varia&le rating into the Independent $ist3
The results are<
The mean al%ohol %ontent "or the entire population is 43!##3 O" the rating
%ategories5 the &eer rated Very /ood has the highest mean al%ohol %ontent5
0hilst the Fair &eer has the lo0est mean al%ohol %ontent3
There are other options availa&le "or the Means %ommand3 2li%-ing on the
9ption &utton in the $eans dialog &o9 0ill allo0 you to display various
statisti%s "or a su&+population5 or you %an per"orm a one+0ay analysis o"
varian%e or a test o" linearity3
3, Correlation
&eport
@9C<8<9
4.,66 11 .17+,
4.57, 14 .4366
4.226 16 .+,54
4.577 35 .#636
Cualit0 o* :eer
!er0 Bood
Bood
Eair
Aotal
7ean N Std. Deviation

Group Statistics
7 3.#71 .77#1 .2,34
2+ 4.+64 .2411 .645#
9ig$t or Regular
9ig$t
Regular
@9C<8<9
N 7ean Std. Deviation
Std. (rror
7ean
T Tests
Independent4Samples T Test
*" you 0ish to %ompare the means o" a %ontinuous varia&le "or t0o groups5 "or
e9ample the al%ohol %ontent o" light and regular &eers in the fle &eer"ull3sav5
you %an run the IndependentCSamples ,
,est as sho0n<
13 On the Anal:Ae menu sele%t *ompare
&eans and then IndependentC
Samples , ,est3 This opens the dialog
&o9<
23 Paste alcohol to the Test Variable-s.
panel on the right3
33 Paste light to the /rouping Variable
panel &elo0<
43 2li%- on the Defne 6roups &utton5 0hi%h opens a
dialog &o9 to defne the groups<
!3 Type 0 into the Group 1 &o95 and 1 into the Group 2
&o93
.3 2li%- the *ontinue &utton5 and then 9;3
This produ%es the "ollo0ing
ta&les:
Regression 46
The frst small ta&le sho0s the means and standard deviations o" al%ohol
"or the light and regular &eers3
*n the main T Test ta&le frst the 6eveneAs Test "or 1uality o" Jarian%es is
run to test i" the varian%es o" the t0o groups are e1ual3 *" the signif%an%e
>%olumn headed @Sig3A? o" the ; test is less than B3B! then use the se%ond
line o" the T Test ta&leD other0ise use the top line3
The %olumn headed Sig. <"Ctailed> sho0s there is a signif%ant di4eren%e
in al%ohol %ontent &et0een light and regular &eers3
The Paired4Samples T Test
The Paired+Samples T test is used to test 0hether one %ontinuous varia&le has
a signif%antly higher mean value than another "or the same %ases in the same
data fle3 To per"orm this test on the
varia&les english and aths in the fle
results3sav open the fle5 then<
Sele%t Anal:AeD*ompare &eansQ
PairedCSamples , ,est3
/hen you sele%t english5 it is
moved into the Current #elections
list<
41 Correlation
Independent Samples Test
21.#24 .666 #.7#6 33 .666 1.132 .1#75 .7,14 1.472,
3.+14 #.2,2 .66+ 1.132 .2,#, .413+ 1.+565
(5ual variances
assumed
(5ual variances
not assumed
@9C<8<9
E Sig.
9eveneIs Aest
*or (5ualit0 o*
!ariances
t d* Sig. %2-tailed&
7ean
Di**erence
Std. (rror
Di**erence 9o.er J//er
,5H Con*idence
Interval o* t$e
Di**erence
t-test *or (5ualit0 o* 7eans
Sele%ting maths also moves this into Current #elections5 so the varia&les
are paired<
Co0 %li%- the arro0 to move the
pair into the &aired Variables panel3
2li%- on 9;.
Regression 42
Statisti%s are sho0n on the di4eren%es &et0een the t0o varia&les3
Paired Samples Statistics
57.#6 36 7.4#+ 1.3#3
53.77 36 #.2,# 1.14,
(nglis$ Results
7at$s Results
Pair
1
7ean N Std. Deviation
Std. (rror
7ean
Paired Samples Correlations
36 .323 .6+2
(nglis$ Results
K 7at$s Results
Pair
1
N Correlation Sig.
Paired Samples Test
3.+3 +.6#5 1.472 .+2 #.+4 2.#63 2, .614
(nglis$ Results
- 7at$s Results
Pair
1
7ean Std. Deviation
Std. (rror
7ean 9o.er J//er
,5H
Con*idence
Interval o* t$e
Di**erence
Paired Di**erences
t d* Sig. %2-tailed&
;irst the means o" nglish and Maths are sho0n5 0ith their standard
deviations3
The se%ond ta&le sho0s the %orrelation &et0een nglish and Maths5 0hi%h
in this %ase is not signif%ant3
The last ta&le is the Paired Samples Test &et0een nglish and Maths5
0hi%h sho0s a signif%ant result5 i3e3 there is a statisti%ally signif%ant
di4eren%e &et0een the nglish and Maths results3
43 Correlation
Correlation
To measure the strength o" an asso%iation &et0een t0o %ontinuous varia&les5
or s%ale measurements5 use the %orrelation %oe4i%ient and its signif%an%e5
and a s%atter plot3
13 Open the fle results3sav3
23 Sele%t Anal:AeD*orrelateD?ivariate to produ%e the "ollo0ing dialog &o9<
33 Paste english and histor: a%ross to the Variables panel on the right3
43 2li%- on 9;3
The "ollo0ing ta&le is produ%ed<
Correlations
1 .+,1LL
. .666
36 36
.+,1LL 1
.666 .
36 36
Pearson Correlation
Sig. %2-tailed&
N
Pearson Correlation
Sig. %2-tailed&
N
(nglis$ Results
8istor0 Results
(nglis$
Results
8istor0
Results
Correlation is signi*icant at t$e 6.61 level %2-tailed&.
LL.
This sho0s that there is a high %orrelation &et0een history and english5 0hi%h
is statisti%ally signif%ant >a per"e%t %orrelation %oe4i%ient has a value o" 1?3
The %orresponding s%atter plot is produ%ed as "ollo0s<
13 ;rom the 6raphs menu sele%t Scatter to produ%e the initial #catterplot
dialog &o93
Regression 44
(nglis$ Results
+6 76 #6 56 46 36
8
i
s
t
o
r
0

R
e
s
u
l
t
s
76
#6
56
46
36

(nglis$ Results
+6 76 #6 56 46 36
8
i
s
t
o
r
0

R
e
s
u
l
t
s
76
#6
56
46
36
23 /e 0ant the #iple plot5 0hi%h is the
de"ault5 so 0e 7ust need to %li%- on the
Defne &utton3 This &rings up the "ollo0ing
dialog &o9<
33 Paste histor: to the : '9is &o9 and english
to the N '9is &o93
43 2li%- on 9;3
The "ollo0ing s%atter plot is produ%ed<
The t0o varia&les appear to have a linear
relationship3
To ft a regression line 0e %an edit the %hart
as "ollo0s3
13 Dou&le+%li%- on the %hart to &ring up the
SPSS *hart Editor3
23 Sele%t "rom the menu *hartD9ptions
to produ%e the "ollo0ing dialog &o9<
33 Sele%t ,otal in the Fit Line &o93
43 2li%- on 9;
!3 2lose the SPSS 2hart ditor &y
%li%-ing on the ) at the top right3
45 Correlation
The plot no0 loo-s li-e this<
Regression 4#
&egression
To per"orm a linear regression to predi%t history results "rom nglish results5
"rom the Anal:Ae menu sele%t
(egression and $inear to open the
dialog &o9<
Paste histor: to the Dependent &o95
and english to the Independent-s.
&o93
2li%- 9;3
The "ollo0ing output is produ%ed in the Jie0er 0indo0<
odel Summary
.+,1
a
.7,4 .7+7 3.+15
7odel
1
R R S5uare
@dMusted
R S5uare
Std. (rror o*
t$e (stimate
Predictors" %Constant&1 (nglis$ Results
a.
A%O0A
b
1575.67+ 1 1575.67+ 16+.263 .666
a
467.5+, 2+ 14.557
1,+2.##7 2,
Regression
Residual
Aotal
7odel
1
Sum o*
S5uares d* 7ean S5uare E Sig.
Predictors" %Constant&1 (nglis$ Results
a.
De/endent !ariale" 8istor0 Results
.
Coefficients
a
-.17+ 5.56, -.632 .,74
.,+7 .6,5 .+,1 16.462 .666
%Constant&
(nglis$ Results
7odel
1
: Std. (rror
Jnstandardi;ed
Coe**icients
:eta
Standardi;ed
Coe**icients
t Sig.
De/endent !ariale" 8istor0 Results
a.
The high value o" $ S1uare5 the slope o" the line >%oe4i%ient ,? and its high
signif%an%e and the signif%ant value o" ; in the 2nalysis of Variance ta&le
%onfrm the strong linear relationship that %an &e seen on the s%atter plot and
sho0 that the nglish results are a good predi%tor "or the history results3
47 Correlation
1urther graphics
This se%tion sho0s you ho0 to generate more spe%if% graphi%s5 modi"y and
print them3
/e 0ill frst produ%e a pie %hart sho0ing ho0 the &eers 0ere rated in the fle
&eer"ull3sav5 so a"ter opening the fle again<
Sele%t the 6raphs menu "ollo0ed &: Pie.
The "ollo0ing intermediate &o9 0ill appear<
The sli%es "or the pie %hart %an &e represented in three di4erent 0ays<
Summaries
#or groups
o# cases
Graphi%ally displays data "or ea%h
%ategory 0ithin a varia&le5 i3e3
ea%h %ategory 0ill represent a pie
sli%e3
e3g3 2lass '5 2lass , and
2lass 2 in %lass in fle
results3sav
Summaries
o# separate
variables
Graphi%ally displays data "or ea%h
varia&le sele%ted5 i3e3 ea%h varia&le
sele%ted 0ill represent a pie sli%e3
e3g 3varia&les english
and history in fle
results3sav
-alues o#
individual
cases
Graphi%ally displays data "or ea%h
%ase 0ithin a varia&le5 i3e3 ea%h
%ase 0ill represent a pie sli%e3
e3g3 ea%h pupilAs result
"or english in results3sav
Most o" the di4erent types o" graph open a dialog &o9 &e"ore pro%eeding to
the main graph dialog &o93 *" you are in dou&t as to 0hi%h option to %hoose5
sele%t the 8elp &utton5 as this sho0s 0hat the graph might loo- li-e3
's 0e 0ant to loo- at %ategori%al data5 %li%- on Defne 0ith the frst option
still sele%ted3 The ne9t dialog &o9 0ill appear<
Regression 4+
Paste the varia&le rating into the De"ne #lices by &o9 and %li%- 9;3
This sho0s graphi%ally the same results 0e produ%ed "or the ;re1uen%ies
%ommand3 The %hart as it is5 ho0ever5 la%-s detail and %ould &e enhan%ed 0ith
a title and some annotations3
Dou&le+%li%- on the %hart3
The SPSS 2hart ditor appears 0ith a ne0 menu &ar as sho0n in the ne9t
e9ample<
4, Correlation
rating
Poor
Bood
!er0 good
*n order to add la&els to the sli%es 0e must frst sele%t the pie3 2li%- on%e
0ithin the area o" the pie to sele%t it >its outlines 0ill &e%ome highlighted? and
then sele%t the menu option *hartDSho+ Data $abels to produ%e the
"ollo0ing &o9<
The upper o" the t0o &o9es tells SPSS 0hi%h la&els it should add3 ,y
de"ault5 SPSS %hooses to sho0 the U2ountV I the num&er o" %ases 0ithin
ea%h %ategory3 'lso availa&le are the per%entage5 and the varia&le value
>rating in this e9ample?3
To de%ide 0hi%h o" these 0ill appear5 you %an sele%t them and then press
either the up0ards arro0 to move them "rom U'vaila&leV to &eing
displayed5 or press the %ross &utton to remove them "rom &eing displayed3
:ou %an display more than one o" these %hoi%es I in 0hi%h %ase you might
li-e to rearrange them using the upFdo0n arro0s 7ust ne9t to the Contents
&o93 *n our e9ample 0e 0ill in%lude all three >rating5 2ount5 and Per%ent?3
:ou %an also %hoose 0hether the la&els are positioned inside or outside the
pie sli%es3 To do this5 sele%t *ustom in the Label &osition panel5 and then
sele%t the i%on representing the option you re1uire3
To apply these pre"eren%es5 %li%- on Appl:5 and then *lose3
Regression 56
;inally5 let us add a title to the pie %hart<
Sele%t the menu options *hartDAdd Data ElementD,et ?o 0hi%h 0ill
add a te9t &o9 0ith the de"ault te9t Textbox5 as sho0n in the ne9t e9ample<

The te9t &o9 has automati%ally &een positioned as i" it 0ere a title5 and is in
editing mode5 so you %an simply type an appropriate title3 ;or this e9ample
type<
C$art S$o.ing :eer Ratings
Press Enter to %ommit your te9t3
:ou %an no0 use the &roperties 0indo0 0hi%h has also appeared5 to set the
te9t %olour5 "ont5 siHe5 et%35 i" you so 0ish3 *" not5 %lose the &roperties
0indo03
:ou %an simply %li%- and drag to reposition the te9t &o95 i" needed3
*n our e9ample5 &e%ause 0e have added la&els to the pie sli%es5 the legend at
the right+hand side is no0 superSuous5 so 0e %an remove it &y %hoosing the
menu option *hartD8ide $egend3
/hen you are satisfed 0ith the %hartAs appearan%e5 %li%- on the %ross at the
top right to %lose the 2hart ditor.
51 Correlation
The fnal pie %hart %an &e seen &elo0<
Printing graphs
'"ter produ%ing a graph5 you may need to print it3
Sele%t the %hart3
;rom the .ile menu %hoose Print to produ%e the &rint dialog &o9<
:ou %an %hange the orientation "rom portrait to lands%ape &y %li%-ing on the
Properties button or &y frst %li%-ing on .ile D Page Setup. Eere you %an also
%hange the siHe &y %li%-ing on the 9ptions &utton and the 9ptions ta&3 :ou
%an loo- at the graph in .ile D Print Previe+5 and %li%- on Print5 or on *lose
to %hange the siHe again frst3
/hen you have set up all the options and are ready to print %li%- on 9;3
Regression 52
Poor
11
31.43H
Bood
14
46.6H
!er0 good
16
2+.57H
C$art s$o.ing eer ratings
*" you 0ould li-e SPSS to produ%e mono%hrome %harts "or &la%- and 0hite
printing5 using patterns rather than %olours to fll the %hart areas5 edit the
graphi%s options as "ollo0s<
13 Sele%t EditD9ptions to produ%e
the 9ptions dialog &o9<
23 2li%- on the *harts ta& to see
the ne9t dialog &o9<
33 2li%- on the option *:cle
through patterns3
43 2li%- on 9;3
:ou may need to regenerate your %hart "or this option to apply3
53 Correlation
Poor
11
31.43H
Bood
14
46.6H
!er0 good
16
2+.57H
C$art s$o.ing eer ratings
1urther reading# boo5s and 6eb
resources
The "ollo0ing &oo-s and 0e&sites have &een re%ommended &y SPSS training
sta4 0ithin 5 %overing either SPSS or statisti%s more generally3 ;urther
suggestions "or re"eren%es to in%lude here 0ould &e 0el%ome3
'oo5s
Dis%overing statisti%s using SPSS "or /indo0s F '3P3 ;ield3 + Sage5 2BBB
Eo0 to design and report e9periments F '3P3 ;ield and G3 Eole3 + Sage5 2BB3
SPSS 12 made simple F P3$3 Kinnear and 23D3 Gray3 + Eove< Psy%hology Press5
2BB4
Statisti%s 0ithout tears < an introdu%tion "or non+mathemati%ians F D3
$o0ntree3 + 6ondon< Penguin5 1))1
6eb resources
SPSS training "rom the SPSS %ompany<
$tt/s"44secure.s/sstraining.com4inde)1.$tml
2on%epts and appli%ations o" in"erential statisti%s<
$tt/"44*acult0.vassar.edu4lo.r04.ete)t.$tml
$esour%es to help you learn and use SPSS<
....ats.a.edu4stat4s/ss4
Regression 54

You might also like