87
7/23/2019 SPSS handout Version 15 5-22-07.doc http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 1/87 INTRODUCTION TO SPSS FOR WINDOWS Version 15.0 Summer 2007

SPSS handout Version 15 5-22-07.doc

  • Upload
    tarar58

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 1/87

INTRODUCTION TO SPSS

FOR WINDOWSVersion 15.0

Summer 2007

Page 2: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 2/87

ContentsPurpose of hn!ou" # Comp"i$i%i"& $e"'een !ifferen" (ersions of SPSS)))))).. 1SPSS 'in!o' # menus)))))))))))))))))))))))))) 1*e""in+ !" in"o SPSS # ,!i"in+ !")))))))))))))))))))).. -Re!in+ n SPSS (ie'erou"pu" /.spo fi%e # ,!i"in+ &our pou")))))))))). 7

S(in+ !" s n SPSS !" /.s( fi%e)..))))))))))))))))))... S(in+ &our ou"pu" /s""is"i% resu%"s n! +rphs)))))))))))))))) 3,4por"in+ SPSS Ou"pu")))))))))))))))))))))))))). 10Prin"in+ &our 'or # ,4i"in+ SPSS))))))))))))))))))))).. 12Runnin+ SPSS usin+ s&n"4 or ommn! %n+u+e /.sps fi%es).))))))))))

1-Cre"in+ ne' (ri$%e)))))))))))))))))))))))))). 16Reo!in+ or om$inin+ "e+ories of (ri$%e)))))))))))))))))15Summarizing your dataFreuen& "$%es /# $r hr"s for "e+ori% (ri$%es))))))))))))).20Con"in+en& "$%es for "e+ori% (ri$%es)))))))))))))))))). 21Desrip"i(e s""is"is /# his"o+rms for numeri% (ri$%es))))))))))).. 22

Desrip"i(e s""is"is /# $o4p%o"s $& +roups for numeri% (ri$%es)))))))). 26Usin+ "he Sp%i" Fi%e op"ion for summries $& +roups))))))))))))))) 28Usin+ "he Se%e" Cses op"ion for summries for su$+roup of su$9e"so$ser("ions))27Graphing your data:r hr")))))))))))))))))))))))))))))))) 2;is"o+rm # :o4p%o"))))))))))))))))))))))))))) 23 Norm% pro$$i%i"& p%o")))))))))))))))))))))))))). -0,rror $r p%o"))))))))))))))))))))))))))))))..-1S""er p%o"))))))))))))))))))))))))))))))).-2<!!in+ %ine or %oess smoo"h "o s""er p%o"))))))))))))))))).. -2S"em=n!=%ef p%o"))))))))))))))))))))))))))))..--Hypothesis tests & Confidence intervals

One smp%e " "es" # Confi!ene in"er(% for men))))))))))))))).-6Pire! " "es" # Confi!ene in"er(% for "he !ifferene $e"'een mens)))))))). -7T'o smp%e " "es" # Confi!ene in"er(% for "he !ifferene $e"'een mens)))))) -3Si+n "es" n! Wi%o4on si+ne! rn "es"))))))))))))))))))....... 62>nn Whi"ne& U "es" /or Wi%o4on rn sum "es")))))))))))).............. 65One='& <NOV< /<n%&sis of (rine # Pos"=ho "es"s))))))))))......... 67?rus%=W%%is "es"))))))))))))))))))))))))))).....50One=smp%e $inomi% "es"))))))))))))))))))))))))...... 52>Nemr@s "es")))))))))))))))))))))))))))))..5-Chi=sure "es" for on"in+en& "$%es))))))..)))))))))))))).55Fisher@s e4" "es"))))))))))))))))))))))))))).......55

Tren! "es" for on"in+en& "$%esor!in% (ri$%es))))))))))))))....... 55:inomi%A >Nemr@sA Chi=sure n! Fisher@s e4" "es"s usin+ summr& !"))).... 53Confi!ene in"er(% for propor"ion))))))))))))))))))))). 8-Correlation & RegressionPerson n! spermn rn orre%"ion oeffiien"))))))))))))))....... 85Biner re+ression)))))))))))))))))))))))))))........8Biner re+ression (i <NOV< ommn!s))))))))))))))))))).. 78Bo+is"i re+ression)))))))))))))))))))))))))))) 0

Page 3: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 3/87

Purpose of handout

SPSS for Win!o's pro(i!es po'erfu% s""is"i% n! !" mn+emen" s&s"em in +rphi%en(ironmen". The user in"erfes me s""is"i% n%&sis more essi$%e for su% users n!

more on(enien" for e4periene! users. >os" "ss n $e omp%ishe! simp%& $& poin"in+ n!

%iin+ "he mouse.

The o$9e"i(e of "his hn!ou" is "o +e" &ou orien"e! 'i"h SPSS for Win!o's. I" "ehes &ou ho'

"o en"er n! s(e !" in SPSSA ho' "o e!i" n! "rnsform !"A ho' "o e4p%ore &our !" $& pro!uin+ +rphis n! summr& !esrip"i(esA n! ho' "o use poin"in+ n! %iin+ "o run

s""is"i% proe!ures. I" is %so in"en!e! "o ser(e s referene +ui!e for SPSS proe!ures "h"

&ou 'i%% nee! "o no' "o !o &our home'or ssi+nmen"s.

Compatibility between different versions of SPSS

SPSS for Win!o's !" fi%es /fi%es en!in+ in .s( n! s&n"4 /ommn! fi%es /fi%es en!in+ in

.sps re omp"i$%e $e"'een !ifferen" (ersions of SPSS /" %es"A (ersions 11.0 or ne'er.;o'e(erA SPSS ou"pu"(ie'er fi%es /fi%es en!in+ .spo re NOT %'&s omp"i$%e $e"'een

!ifferen" (ersions. Usu%%& SPSS ou"pu" fi%es re"e! 'i"h n o%! (ersion n! n $e re! $& ne' (ersionA $u" n ou"pu" fi%e re"e! usin+ ne' (ersion n no" $e re! $& n o%! (ersion.

One op"ion for (oi!in+ omp"i$i%i"& pro$%ems $e"'een !ifferen" (ersions of SPSS is "o export  

&our ou"pu" in h"m% or >S Wor! form". The omp"i$i%i"& $e"'een Win!o' n! > (ersionsof SPSS is %imi"e!.

SPSS Windows & enus

<n o(er(ie' of "he SPSS 'in!o'sA menusA "oo%$rsA n! !i%o+ $o4es is +i(en in "he SPSS

!utorials un!er ;e%p. ou n %so fin! inform"ion un!er TopisA Cse S"u!iesA S""is"isCohA n! Commn! # S&n"4 /if &ou re usin+ s&n"4 ommn!s.

Window !ypes

SPSS "ata #ditor. When &ou s"r" n SPSS sessionA &ou usu%%& see "he D" ,!i"or 'in!o'

/o"her'ise &ou 'i%% see Vie'er 'in!o'. The D" ,!i"or !isp%&s "he on"en"s of "he 'orin+!" fi%e. There "'o (ie's in "he !" e!i"or 'in!o' 1 D" Vie' !isp%&s "he !" in

spre!shee" form" 'i"h (ri$%e nmes %is"e! for o%umn he!in+sA n! 2 Vri$%e Vie' 'hih

!isp%&s inform"ion $ou" "he (ri$%es in &our !" se". In "he D" Vie' &ou n e!i" or en"er!"A n! in "he Vri$%e Vie' &ou n hn+e "he form" of (ri$%eA !! form" n! (ri$%e

%$e%sA e".

SPSS $iewer%utput. S""is"i% resu%"s n! +rphs re !isp%&e! in "he Vie'er 'in!o'. The/ou"pu" Vie'er 'in!o' is !i(i!e! in"o "'o pnes. The ri+h"=hn! pne on"ins "he %% "he

ou"pu" n! "he %ef"=hn! pne on"ins "ree=s"ru"ure of "he resu%"s. ou n use "he %ef"=hn!

 pne for n(i+"in+ "hrou+hA e!i"in+ n! prin"in+ &our resu%"s.

1

Page 4: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 4/87

Chart #ditor. The hr" e!i"or is use! "o e!i" +rphs. When &ou !ou$%e=%i on fi+ure or

+rphA i" 'i%% repper in hr" e!i"or 'in!o'.

SPSS Synta' #ditor. The S&n"4 ,!i"or is use! "o re"e SPSS ommn! s&n"4 for usin+ "he

SPSS pro!u"ion fi%i"&. Usu%%& &ou 'i%% $e usin+ "he poin" n! %i fi%i"ies of SPSSA n!

heneA &ou 'i%% no" nee! "o use "he S&n"4 ,!i"or. >ore inform"ion $ou" "he S&n"4 ,!i"or n!usin+ "he SPSS s&n"4 is +i(en in "he SPSS ;e%p Tu"ori%s un!er Worin+ 'i"h S&n"4. < fe'

ins"ru"ions "o +e" &ou s"r"e! re +i(en %"er in "he hn!ou" in "he se"ion Runnin+ SPSS usin+

"he S&n"4 ,!i"or /or Commn! Bn+u+e

enus

"ata #ditor enu

(ile. Use "he Fi%e menu "o re"e ne' SPSS fi%eA open n e4is"in+ fi%eA or re! in spre!shee" or

!"$se fi%es re"e! $& o"her sof"'re pro+rms /e.+.A ,4e%.

#dit) Use "he ,!i" menu "o mo!if& or op& !" n! ou"pu" fi%es.

$iew. Choose 'hih $u""ons re (i%$%e in "he 'in!o' or ho' "he 'in!o' shou%! %oo.

"ata. Use "he D" menu "o me hn+es "o SPSS !" fi%esA suh s mer+in+ fi%esA "rnsposin+

(ri$%esA or re"in+ su$se"s of ses for su$se" n%&sis.

!ransform. Use "he Trnsform menu "o me hn+es "o se%e"e! (ri$%es in "he !" fi%e /e.+.A

"o reo!e (ri$%e n! "o ompu"e ne' (ri$%es $se! on e4is"in+ (ri$%es.

*nalyze. Use "he <n%&Ee menu "o se%e" "he (rious s""is"i% proe!ures &ou 'n" "o useA suh

s !esrip"i(e s""is"isA ross="$u%"ionA h&po"hesis "es"in+ n! re+ression n%&sis.

Graphs. Use "he *rphs menu "o !isp%& "he !" usin+ $r hr"sA his"o+rmsA s""erp%o"sA

 $o4p%o"sA or o"her +rphi% !isp%&s . <%% +rphs n $e us"omiEe! 'i"h "he Chr" ,!i"or.

+tilities. Use "he U"i%i"ies menu "o (ie' (ri$%e %$e%s for eh (ri$%e.

*dd,ons. Inform"ion $ou" o"her SPSS sof"'re.

Window. Choose 'hih 'in!o' &ou 'n" "o (ie'.

Help. In!e4 of he%p "opisA "u"ori%sA SPSS home p+eA S""is"is ohA n! (ersion of SPSS.

$iewer enu >enu is simi%r "o D" ,!i"or menuA $u" hs "'o !!i"ion% op"ions

-nsert. Use "he inser" menu "o e!i" &our ou"pu"

(ormat. Use "he form" menu "o hn+e "he form" of &our ou"pu".

Chart #ditor enu Use SPSS ;e%p "o %ern more $ou" "he Chr" ,!i"or.

2

Page 5: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 5/87

!oolbars

>os" Win!o's pp%i"ions pro(i!e $u""ons rrn+e! %on+ "he "op of 'in!o' "h" " sshor"u"s "o e4eu"in+ (rious fun"ions. In SPSSA &ou 'i%% fin! suh $u""ons /ions " "he "op

"he of "he D" ,!i"orA Vie'erA Chr" ,!i"orA n! S&n"4 'in!o's. The ions re usu%%&

s&m$o%i represen""ions of "he proe!ure "he& e4eu"e 'hen pushe!A unfor"un"e%& "heirmenin+s re no" in"ui"i(e%& o$(ious un"i% one hs %re!& use! "hem. ;eneA "he $es" '& "o

%ern "hese $u""ons is "o use "hem n! no"e 'h" hppens.

The S""us :r The S""us :r runs %on+ "he $o""om of 'in!o' n! %er"s "he user "o "he s""us

of "he s&s"em. T&pi% mess+es one 'i%% see re SPSS Proessor is re!&GA

Runnin+ proe!ure)G. The S""us :r 'i%% %so pro(i!e up="o=!"e inform"ion onernin+spei% mnipu%"ions of "he !" fi%e %ie 'he"her on%& er"in ses re $ein+ use! in n

n%&sis or if "he !" hs $een 'ei+h"e! or!in+ "o "he (%ue of some (ri$%e.

(ile !ypes

"ata (iles. < fi%e 'i"h n e4"ension of )sav is ssume! "o $e !" fi%e in SPSS for Win!o's

form". < fi%e 'i"h n e4"ension of .por is por"$%e SPSS !" fi%e. The on"en"s of !" fi%ere !isp%&e! in "he D" ,!i"or 'in!o'.

$iewer .utput/ (iles. < fi%e 'i"h n e4"ension of )spo is ssume! "o $e Vie'er fi%eon"inin+ s""is"i% resu%"s n! +rphs.

Synta' .Command/ (iles. < fi%e 'i"n n e4"ension of )sps is ssume! "o $e S&n"4 fi%eon"inin+ spss s&n"4 n! ommn!s.

Getting "ata into SPSS & #diting "ata

When re!in+ n! e!i"in+ !" in"o SPSS "he !" 'i%% $e !isp%&e! in "he D" ,!i"or Win!o'.

<n o(er(ie' of "he $si s"ru"ure of n SPSS !" fi%e is +i(en in "he SPSS Help !utorials

1. Choose ;e%p on "he menu $r 

2. Choose Tu"ori%-. Choose Re!in+ D"

Reading "ata from a SPSS "ata .)sav/ (ile

To re! !" fi%e from &our ompu"erf%opp& !isf%sh !ri(e "h" 's re"e! n! s(e! usin+SPSS. The fi%enme shou%! en! 'i"h "he suffi4 )sav.

1. Choose Open n e4is"in+ !" soure

2. Dou$%e %i on "he fi%enme or

-. Sin+%e %i on "he fi%enme n! hoose O? 

Or 

-

Page 6: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 6/87

1. Choose Cne%

2. Choose Fi%e on "he menu $r -. Choose Open

6. Choose D"...

5. ,!i" "he !ire"or& or !is !ri(e "o in!i"e 'here "he !" is %o"e!.8. Dou$%e %i on "he fi%enme or 

7. Sin+%e %i on "he fi%enme n! hoose Open

Reading "ata from an !e't "ata (ile

To re! n r'"e4" /sii !" fi%e from &our ompu"erf%opp& !isf%sh !ri(eA 'here "he !"

for eh o$ser("ion is on sepr"e %ine n! spe is use! "o sepr"e (ri$%es on "he sme%ine /i.e.A "he fi%e form" is freefie%!. The fi%enme shou%! en! 'i"h "he suffi4 )dat.

1. Choose Fi%e on "he menu $r2. Choose Re! Te4" D"

-. Choose Fi%es of T&pe H.!"6. ,!i" "he !ire"or& or !is !ri(e "o in!i"e 'here "he !" is %o"e!

5. Dou$%e %i on "he fi%enme or 8. Sin+%e %i on "he fi%enme n! hoose Open

7. Fo%%o' "he Impor" WiEr! Ins"ru"ions.

ou n %so +e" "o "he Impor" WiEr! s fo%%o's

1. Choose Fi%e on "he menu $r

2. Choose Open-. Choose D"...

6. Choose Fi%es of T&pe H.!"

5. ,!i" "he !ire"or& or !is !ri(e "o in!i"e 'here "he !" is %o"e!8. Dou$%e %i on "he fi%enme or 

7. Sin+%e %i on "he fi%enme n! hoose Open

. Fo%%o' "he Impor" WiEr! Ins"ru"ions.

Ins"ru"ions on ho' "o re! "e4" !" fi%e in fi4e! form" re %o"e! in SPSS ;e%p Tu"ori%s

un!er Re!in+ D" from Te4" Fi%e.

6

Page 7: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 7/87

Reading "ata from ther !ypes of #'ternal (iles

SPSS %%o's &ou "o re! (rie"& of o"her "&pes of e4"ern% fi%esA suh s ,4e% spre!shee" fi%esAS<S !" fi%esA Bo"us 1=2=- spre!shee" fi%esA n! !:<S, !"$se fi%es. To re! !" from o"her

"&pes of e4"ern% fi%esA &ou fo%%o' "he sme s"eps s &ou 'ou%! for re!in+ n SPSS s(e fi%eA

e4ep" "h" &ou speif& "he fi%e "&pe or!in+ "o 'h" p+e 's use! "o re"e "he s(e fi%e.For fur"her ins"ru"ion on ho' "o re! !" from o"her "&pes of e4"ern% fi%esA see "he SPSS for

Win!o's :se S&s"em Users *ui!e on !" fi%es or "he SPSS ;e%p Tu"ori%s.

#ntering and #diting "ata +sing the "ata #ditor

The D" ,!i"or pro(i!es on(enien" spre!shee"=%ie fi%i"& for en"erin+A e!i"in+A n!!isp%&in+ "he on"en"s of &our !" fi%e. < D" ,!i"or 'in!o' opens u"om"i%%& 'hen &ou

s"r" n SPSS session. Ins"ru"ion on Usin+ "he D" ,!i"or "o en"er !" is +i(en in "he SPSS

;e%p Tu"ori%s. No"e "h" if &ou re %re!& fmi%ir 'i"h en"erin+ !" in"o !ifferen"

spre!shee" pro+rm /e.+.A >S ,4e%A &ou mi+h" fin! i" es& "o en"er &our !" in "he pro+rm

&our re fmi%ir 'i"h n! "hen re! "he !" in"o SPSS.

#ntering "ata) :si !" en"r& in "he D" ,!i"or is simp%e

Step 0. Cre"e ne' /emp"& D" ,!i"or 'in!o'. <" "he s"r" of n SPSS session ne'

/emp"& D" ,!i"or 'in!o' opens u"om"i%%&. Durin+ n SPSS session &ou n re"e ne'D" ,!i"or 'in!o' $&

1. Choose Fi%e

2. Choose Ne'-. Choose D"

Step 1) >o(e "he ursor "o "he firs" emp"& o%umn.

Step 2) T&pe (%ue in"o "he e%%. <s &ou "&peA "he (%ue ppers in "he e%% e!i"or " "he "op of

"he D" ,!i"or 'in!o'. ,h "ime &ou press "he ,n"er e&A "he (%ue is en"ere! in "he e%% n!&ou mo(e !o'n "o "he ne4" ro'. :& en"erin+ !" in o%umnA &ou u"om"i%%& re"e

(ri$%e n! SPSS +i(es i" "he !efu%" (ri$%e nme (r00001.

Step 3) Choose "he firs" e%% in "he ne4" o%umn. ou n use "he mouse "o %i on "he e%% or use"he rro' e&s on "he e&$or! "o mo(e "o "he e%%. :& !efu%"A SPSS nmes "he !" in "he

seon! o%umn (r00002.

Step 4. Repe" s"ep 6 un"i% &ou h(e en"ere! %% "he !". If &ou en"ere! n inorre" (%ue/s &ou

'i%% nee! "o e!i" &our !". See "he fo%%o'in+ se"ion on ,!i"in+ D".

5

Page 8: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 8/87

#diting "ata) Wi"h "he D" ,!i"orA &ou n mo!if& !" fi%e in mn& '&s. For e4mp%e &ou

n hn+e (%ues or u"A op&A n! ps"e (%uesA or !! n! !e%e"e ses.

!o Change a "ata $alue

1. C%i on !" e%%. The e%% (%ue is !isp%&e! in "he e%% e!i"or.

2. T&pe "he ne' (%ue. I" rep%es "he o%! (%ue in "he e%% e!i"or.-. Press "hen ,n"er e&. The ne' (%ue ppers in "he !" e%%.

!o Cut5 Copy5 and Paste "ata $alues

1. Se%e" /hi+h%i+h" "he e%% (%ue/s &ou 'n" "o u" or op&.

2. Pu%% !o'n "he ,!i" $o4 on "he min menu $r.

-. Choose Cu". The se%e"e! e%% (%ues 'i%% $e opie!A "hen !e%e"e!. Or 

6. Choose Cop&. The se%e"e! e%% (%ues 'i%% $e opie!A $u" no" !e%e"e!.5. Se%e" "he "r+e" e%%/s /'here &ou 'n" "o pu" "he u" or op& (%ues.

8. Pu%% !o'n "he ,!i" $o4 on "he min menu $r.

7. Choose Ps"e. The u" or op& (%ues 'i%% $e JJps"e! in "he "r+e" e%%s.

!o "elete a Case .i)e)5 a Row of "ata/

1. C%i on "he se num$er on "he %ef" si!e of "he ro'. The 'ho%e ro' 'i%% $e hi+h%i+h"e!.2. Pu%% !o'n "he ,!i" $o4 on "he min menu $r.

-. Choose C%er.

!o *dd a Case .i)e)5 a Row of "ata/

1. Se%e" n& e%% in "he se from "he ro' $e%o' 'here &ou 'n" "o inser" "he ne' se.

2. Pu%% !o'n "he D" $o4 on "he min menu $r.

-. Choose Inser".

"efining $ariables) The !efu%" nme for ne' (ri$%es is "he prefi4 var  n! seuen"i% fi(e=

!i+i" num$er /e.+.A (r00001A (r00002A (r0000-. To hn+e "he nmeA form" n! o"her""ri$u"es of (ri$%e.

1. Dou$%e %i on "he (ri$%e nme " "he "op of o%umn orA2. C%i on "he Vri$%e Vie' "$ " "he $o""om of D" ,!i"or Win!o'.

-. ,!i" "he (ri$%e nme un!er o%umn %$e%e! Nme. The (ri$%e nme mus" $e ei+h"

hr"ers or %ess in %en+"h. ou n %so speif& "he num$er of !eim% p%es /un!er

Deim%sA ssi+n !esrip"i(e nme /un!er B$e%A !efine missin+ (%ues /un!er>issin+A !efine "he "&pe of (ri$%e /un!er >esureK e.+.A s%eA or!in%A nomin%A n!

!efine "he (%ues for nomin% (ri$%es /un!er V%ues.

<f"er "he !" is en"ere! /or se(er% "imes !urin+ !" en"erin+A &ou 'i%% 'n" "o s(e i" s n

SPSS s(e fi%e. See "he se"ion on S(in+ D" <s <n SPSS S(e Fi%e.

8

Page 9: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 9/87

Reading an SPSS $iewer%utput .)spo/ (ile

S""is"i% resu%"s n! +rphs re !isp%&e! in "he Vie'er 'in!o'. <n o(er(ie' of ho' "o use"he Vie'er is +i(en in "he SPSS Help !utorials un!er Worin+ 'i"h Ou"pu".

If &ou s(e! "he resu%"s of Vie'er 'in!o' !urin+ n er%ier SPSS sessionA &ou n use "hefo%%o'in+ ommn!s "o !isp%& "he Vie'er /ou"pu" resu%"s in urren" SPSS session. ;o'e(erA

SPSS ou"pu"(ie'er fi%es /fi%es en!in+ .spo re NOT %'&s omp"i$%e $e"'een !ifferen"

(ersions. Usu%%& SPSS ou"pu" fi%es re"e! 'i"h n o%!er (ersion n! n $e re! $& ne'(ersionA $u" n ou"pu" fi%e re"e! usin+ ne' (ersion n no" $e re! $& n o%!er (ersion. One

op"ion for (oi!in+ omp"i$i%i"& pro$%ems $e"'een !ifferen" (ersions of SPSS is "o export  &our

ou"pu" in h"m% or >S Wor! form". The omp"i$i%i"& $e"'een Win!o' n! > (ersions ofSPSS is %imi"e!.

To re! Vie'er fi%e from &our ompu"erLf%opp& !isLf%sh!ri(e "h" 's re"e! n! s(e!

usin+ SPSS. The fi%enme shou%! en! 'i"h "he suffi4 spo.

1. Choose Fi%e on "he menu $r 

2. Choose Open-. Choose Ou"pu"...

6. ,!i" "he !ire"or& or !is !ri(e "o in!i"e 'here "he !" is %o"e!

5. Dou$%e %i on "he fi%enme or 8. Sin+%e %i on "he fi%enme n! hoose Open

#diting 6our utput

,!i"in+ "he s""is"i% resu%"s n! +rphs in "he Vie'er 'in!o' is $e&on! "he sope of "his

hn!ou". Ins"ru"ions on ho' "o e!i" &our ou"pu" is +i(en in "he SPSS Help !utorials un!erWorin+ 'i"h Ou"pu" n! Cre"in+ n! ,!i"in+ Chr"s.

• ou n use ei"her "he "ree=s"ru"ure in "he %ef" hn! pne or "he resu%"s !isp%&e! in "he ri+h"

hn! pne "o se%e"A mo(e or !e%e"e pr"s of "he ou"pu".

• To e!i" "$%e or o$9e" /n o$9e" is +roup of resu%"s &ou firs" nee! "o !ou$%e %i on "he

"$%eo$9e" so n e!i"in+G $o4 ppers roun! "he "$%eo$9e"A n! "hen se%e" "he (%ue &ou

'n" "o mo!if&. <n e!i"in+ $o4G 'i%% $e r++e! $o4 ou"%inin+ "he "$%e. If &ou on%& !o sin+%e %i &ou 'i%% +e" $o4 'i"h s"ri+h"p%in %ines ou"%inin+ "he "$%e. In +ener%A "o re"e

nie %ooin+G "$%es of &our resu%"s i" is of"en esier "o hn! en"er "he (%ues in"o $%n >S

Wor! "$%e "hn "o e!i" SPSS "$%eo$9e" /ei"her in SPSS or >S Wor!.

• To e!i" hr" &ou firs" nee! "o !ou$%e %i on "he hr" so i" ppers in ne' Chr" ,!i"or

'in!o'. <f"er &ou re !one e!i"in+ "he hr"A %ose "he 'in!o' n! "hen e4por" "he hr"A for

e4mp%e "o 'in!o's me"fi%e n! "hen in"o >S Wor! fi%e.

7

Page 10: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 10/87

• :& !efu%" in SPSS P=(%ue is !isp%&e! s .000 if "he P=(%ue is %ess "hn .001. ou n

repor" "he P=(%ue s M.001 or "o h(e SPSS !isp%& more si+nifin" !i+i"s

1. In SPSS /ou"pu" Vie'er 'in!o' !ou$%e %i /'i"h "he %ef" mouse $u""on on "he "$%eon"inin+ "he p=(%ue &ou 'n" "o !isp%& !ifferen"%& < JJe!i"in+ $o4 shou%! pper

roun! "he "$%e.

2. C%i on "he p=(%ue usin+ "he right mouse button.-. Choose Ce%% Proper"ies. /If &ou !o no" +e" "his op"ionA &ou nee! "o !ou$%e %i on "he "$%e

"o +e" "he r++e! $o4.

6. Chn+e "he num$er of !eim%s "o "he !esire! num$er /!efu%" is -.5. Choose O? or

8. Dou$%e %i on "he p=(%ue 'i"h "he %ef" mouse $u""on n! SPSS 'i%% !isp%& "he p=(%ue

'i"h more si+nifin" !i+i"s. If "he p=(%ue is (er& sm%%A "he p=(%ue 'i%% $e !isp%&e! in

sien"ifi no""ion /e.+.A 1.765,=10 0.0000000001765.

Saving "ata as an SPSS "ata .)sav/ (ile

To s(e !" s new SPSS D" fi%e on"o &our ompu"erf%opp& !isf%sh!ri(e

1. Disp%& "he D" ,!i"or 'in!o' /i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%e in "he D"

,!i"or 'in!o' !isp%&in+ "he !" &ou 'n" "o s(e.

2. Choose Fi%e on "he menu $r.-. Choose S(e <s...

6. ,!i" "he !ire"or& or !is !ri(e "o in!i"e 'here "he !" shou%! $e s(e!. SPSS 'i%%

u"om"i%%& !! "he .s( suffi4 "o "he fi%enme.

5. Choose S(e

To s(e !" hn+es in n existing  SPSS S(e fi%e.

1. Disp%& "he D" ,!i"or 'in!o' /i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%e in "he D"

,!i"or 'in!o' !isp%&in+ "he !" &ou 'n" "o s(e.

2. Choose Fi%e $o4 on "he menu $r-. Choose S(e

Caution. The S(e ommn! s(es "he mo!ifie! !" $& o(er'ri"in+ "he pre(ious (ersion of "he

fi%e.

ou n s(e &our !" in o"her form"s $esi!es n SPSS s(e fi%e /e.+.A s n <SCII fi%eA ,4e%

fi%eA S<S !" se". To s(e &our !" 'i"h +i(en form" &ou fo%%o' "he sme s"eps s s(in+

!" in ne' SPSS S(e fi%eA e4ep" "h" &ou speif& "he S(e s T&pe s "he !esire! form".

Page 11: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 11/87

Saving 6our utput .Statistical Results and Graphs/

To s(e "he s""is"i% resu%"s n! +rphs !isp%&e! in "he Vie'er 'in!o' s new SPSS Ou"pu"fi%e

1. Disp%& "he Vie'er 'in!o' /i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%e in "he Vie'er'in!o' !isp%&in+ "he resu%"s &ou 'n" "o s(e.

2. Choose Fi%e on "he menu $r.

-. Choose S(e <s...6. ,!i" "he !ire"or& or !is !ri(e "o in!i"e 'here "he ou"pu" shou%! $e s(e!. SPSS 'i%%

u"om"i%%& !! "he .spo suffi4 "o "he fi%enme.

5. Choose S(e

To s(e Vie'er hn+es in n existing  SPSS Ou"pu" fi%e.

1. Disp%& "he Vie'er 'in!o' /i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%e in "he Vie'er

'in!o' !isp%&in+ "he resu%"s &ou 'n" "o s(e.2. Choose Fi%e on "he menu $r.

-. Choose S(e.

Caution. The S(e ommn! s(es "he mo!ifie! Vie'er 'in!o' $& o(er'ri"in+ "he pre(ious

(ersion of "he fi%e.

7ote  "h" &ou 'i%% not  $e $%e "o open SPSS ou"pu" "h" 's re"e! 'i"h ne'er (ersion "hn

"he (ersion of SPSS "h" &ou re usin+ "o open "he ou"pu". ;eneA &ou m& 'n" "o (oi! "his

 pro$%em &ou $& e4por"in+ &our ou"pu" in h"m% or >S 'or! form". <%soA hr"s of"en !o no"e4por" proper%& in"o ;"m% or Wor! fi%e. Usu%%& &ou nee! "o e4por" hr"s sepr"e%& in"o

'in!o' me"fi%e fi%e /.'mf. Some"imes "he ou"pu"A in%u!in+ hr"sA n! $e opie! n! ps"e!!ire"%& in"o Wor! fi%e.

3

Page 12: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 12/87

#'porting SPSS utput

Some"imes &ou 'i%% 'n" "o s(e &our SPSS ou"pu" in !ifferen" fi%e form" "hn SPSS ou"pu"fi%eA $euse &ou 'n" "o (oi! omp"i$i%i"& pro$%ems $e"'een !ifferen" (ersions of SPSSA &ou

'n" "o fur"her e!i" &our ou"pu" in Wor! !oumen"A or &ou 'n" in%u!e +rphs or fi+ures in

no"her !oumen" fi%e. The $si s"eps in e4por"in+ SPSS ou"pu" "o no"her fi%e "&pe reA 'hi%ein SPSS /ou"pu" Vie'er 'in!o'

1. Choose Fi%e2. Choose ,4por"

10

  -. Choose 'h" &ou 'n" "o e4por"

Ou"pu" Doumen" e4por"s %% "he ou"pu"

Ou"pu" Doumen" /No Chr"s e4por"s on%&

"he numeri% resu%"s

Chr"s On%& e4por"s on%& hr"s /i.e.A +rphs #fi+ures

7ote "h" hr"s of"en !o no" e4por" proper%& in"o ;"m% or Wor! fi%e. Usu%%& &ou nee! "o e4por"

hr"s sepr"e%& in"o 'in!o' me"fi%e fi%e

/.'mf.

6. Define fur"her 'h" &ou 'n" "o e4por"

<%% O$9e"s "his op"ion %so e4por"s o"her

e4"rneous inform"ion /rre%& usefu%

<%% Visi$%e O$9e"s use "his op"ion "o

e4por" %% "he ou"pu".

Se%e"e! O$9e"s "his %%o's &ou "o e4por"

on%& "he o$9e"s &ou h(e se%e"e! in "he

Vie'er 'in!o'.

Page 13: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 13/87

 

11

8. Choose "he %o"ion n! fi%e nme for "he

ou"pu" &ou 'n" "o e4por".

7. Choose O? 

5. Choose "he fi%e "&pe

;T>B n! Wor!RTF +oo! fi%e

"&pes for numeri% resu%"s /nohr"s.

Win!o's >e"fi%e /.W>F is +oo! fi%e"&pe for hr"s in &ou 'n" "o in%u!e

fi+ures in >S Wor! !oumen".

7ote "h" "he fi%e "&pe op"ions re

!epen!en" on 'h" &ou re e4por"in+.

Page 14: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 14/87

Printing 6our Wor8 in SPSS

To prin" s""is"i% resu%"s n! +rphs in "he Vie'er 'in!o' or !" in "he D" ,!i"or 'in!o'

#'iting SPSS

To e4i" SPSS

1. Choose Fi%e on "he menu $r 

2. Choose ,4i" SPSS

If &ou h(e m!e hn+es "o "he !" fi%e or "he ou"pu" fi%e sine "he %s" "ime &ou s(e! "hesefi%esA $efore e4i"in+ SPSS &ou 'i%% $e se! 'he"her &ou 'n" "o s(e "he on"en"s of "he D"

,!i"or 'in!o' n! Vie'er 'in!o'. If &ou re unsure s "o 'he"her &ou 'n" "o s(e "he

on"en"s of "he !" or ou"pu" 'in!o'A hoose Cne%A "hen !isp%& "he 'in!o'/s n! if &ou'n" "o s(e "he on"en"s of "he 'in!o'A fo%%o' "he ins"ru"ions in "his hn!ou" for s(in+ !" or 

ou"pu" 'in!o's. SPSS 'i%% use "he o(er'ri"e me"ho! 'hen s(in+ "he on"en"s of "he 'in!o'.

12

1. Disp%& "he ou"pu" or !" &ou 'n" "o prin"

/i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%ein ou"pu" or !" 'in!o'2. Choose Fi%e on "he menu $r.

-. Choose Prin"...

6. Choose <%% (isi$%e ou"pu" or Se%e"ion /if &ouh(e se%e"e! pr"s of "he ou"pu". When

 prin"in+ from !" fi%eA "he op"ions re <%%A

Se%e"ion n! P+e "o P+e .5. Choose O? 

Page 15: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 15/87

Running SPSS using Synta' .or Command 9anguage/

This hn!ou" !esri$es ho' "o "he run (rious s""is"i% summries n! proe!ures usin+ "he poin"=n!=%i menus in SPSS. ;o'e(erA i" is possi$%e run SPSS ommn!s usin+ SPSS

s&n"4ommn! %n+u+e. If &ou re runnin+ simi%r n%&ses repe"e!%&A i" n $e more

effiien" "o run &our n%&sis usin+ SPSS s&n"4. ;o' "o run SPSS usin+ "he s&n"4ommn!%n+u+e is $e&on! "he sope of "his hn!ou". ;e%p on runnin+ SPSS usin+ "he s&n"4ommn!

%n+u+e n $e foun! in "he SPSS !utorials under Wor8ing with Synta'.

To +e" &ou s"r"e! usin+ SPSS s&n"4A fo%%o' "he poin"=n!=%i ins"ru"ions for runnin+

 pr"iu%r n%&sisA $u" se%e" Ps"e ins"e! of O? " "he %s" s"ep. < SPSS S&n"4 ,!i"or 'in!o'

'i%% open on"inin+ "he SPSS s&n"4 for runnin+ "he n%&sis. To run "he n%&sis &ou nhoose Run on "he menu $r or &ou n hi+h%i+h" "he s&n"4 &ou 'n" "o runA %i "he right  

mouse $u""onA n! se%e" Run Curren". ou n !! more s&n"4 "o "he S&n"4 ,!i"or 'in!o' $&

usin+ "he poin"=n!=%i me"ho!A se%e"in+ Ps"e ins"e! of O? " "he %s" s"ep. The !!i"ion%

s&n"4 'i%% $e !!e! " "he $o""om of "he S&n"4 ,!i"or 'in!o'. ou n %so 'ri"e s&n"4

!ire"%& in"o "he s&n"4 fi%e n!or use op&A ps"e n! e!i"in+ ommn!s "o mo!if& "he s&n"4.Remem$er "o s(e &ou s&n"4 fi%e $efore e4i"in+ SPSS. The fi%e shou%! en! in .sps. ou n

open s&n"4 fi%e $& se%e"in+ Fi%e on "he menu $rA OpenA n! "he S&n"4)

1-

;ere@s n e4mp%e of SPSS s&n"4.

This s&n"4 runs "'o smp%e "es"

omprin+ ;DB ho%es"ero% /h!% forsu$9e"s 'i"hou" n! 'i"h fmi%& his"or&

of her" "" /fhhA o!e! 0 for no n! 1

for &es.

This s&n"4 re"es - in!i"ors (ri$%esA

ne(ersmoeA formersmoeA n!urren"smoe for smoin+ s""us /smoe.

 No"e "h" perio! /. is use! "o !eno"e "he

en! of s"rin+ of s&n"4 n! ,4eu"e. issome"imes reuire! "o run "he s&n"4.

Page 16: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 16/87

Creating a 7ew $ariable 

To re"e ne' (ri$%e

1. Disp%& "he "ata #ditor window /i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%e in "he D"

,!i"or 'in!o' !isp%&in+ "he !" fi%e &ou 'n" "o use "o re"e ne' (ri$%e.2. Choose !ransform on "he menu $r 

-. Choose Compute...

6. ,n"er "he ne' (ri$%e nme in "he Tr+e" Vri$%e $o4.5. ,n"er "he !efini"ion of "he ne' (ri$%e in "he Numeri ,4pression $o4 /e.+.A SQRT/(isnA

BN/+eA or >,<N/+e or

8. Se%e" (ri$%e/s n! om$ine 'i"h !esire! ri"hme"i oper"ions n!or fun"ions.

7. Choose : 

<f"er re"in+ ne' (ri$%e/sA &ou 'i%% pro$$%& 'n" "o s(e "he ne' (ri$%e/s $& re=s(in+

&our !" usin+ "he S(e ommn! un!er Fi%e on "he menu $r /See S(in+ D" s n SPSSS(e Fi%e. Fur"her ins"ru"ions on re"in+ ne' (ri$%e re +i(en in "he SPSS Help !utorials

under odifying "ata $alues.

Example: Creating a (New) Transformed Variable

You can use the SPSS commands for creating a new variable to create a transformedvariable. Suppose you have a variable indicating triglyceride level, trig, and you want totransform this variable using the natural logarithm to make the distribution less skewed(i.e., you want to create a new variable which is natural logarithm of triglyceride levels) .

Now, a new variable, lntrig, which is the natural logarithm of trig, will be added to yourdata set. emember to save your data set before e!iting SPSS (e.g., while in the SPSS"ata window, choose Save under #ile or click on the floppy disk icon).

16

1. Disp%& "he D" ,!i"or 'in!o'

2. Choose Trnsform on "he menu $r 

-. Choose Compu"e...6. ,n"erA s&A %n"ri+A in "he Tr+e"

Vri$%e $o4.

5. ,n"er Bn/"ri+ in "he Numeri,4pression $o4.

8. Choose O? 

Page 17: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 17/87

Recoding or Combining Categories of a $ariable

To reo!e or om$ine "e+ories of (ri$%e

1. Disp%& "he "ata #ditor window /i.e.A e4eu"e "he fo%%o'in+ ommn!s 'hi%e in "he D"

,!i"or 'in!o' !isp%&in+ "he !" fi%e &ou 'n" "o use "o reo!e (ri$%es.2. Choose !ransform on "he menu $r 

-. Choose Recode 

6. Choose In"o Sme Vri$%e... or -nto "ifferent $ariable...5. Select a variable to recode from "he (ri$%e %is" on "he %ef" n! "hen %i on "he rro'

%o"e! in "he mi!!%e of "he 'in!o'. This !efines "he inpu" (ri$%e.

8. If reo!in+ in"o !ifferen" (ri$%eA enter the new variable name in "he $o4 un!er NmeA"hen hoose Chn+e. This !efines "he ou"pu" (ri$%e.

7. Choose ld and 7ew $alues...

. Choose V%ue or Rn+e un!er O%! V%ue n! en"er o%! (%ue/s.

3. Choose Ne' V%ue n! en"er ne' (%ueA "hen hoose *dd.

10. Repe" "he proess un"i% %% o%! (%ues h(e $een re!efine!.11. Choose Continue

12. Choose : 

<f"er re"in+ ne' (ri$%e/sA &ou 'i%% pro$$%& 'n" "o s(e "he ne' (ri$%e/s $& re=s(in+

&our !" usin+ "he S(e ommn! un!er Fi%e $o4 on "he menu $r /See S(in+ D" s n SPSSS(e Fi%e.

Example: Recoding a Categorical Variable

You can use the commands for recoding a variable to change the coding values of a

categorical variable. You may want to change a coding value for a particular category tomodify which category SPSS uses as the referent category in a statistical procedure. #ore!ample, suppose you want to perform linear regression using the $N%&$ (or 'eneralinear odel) commands, and one of your independent variables is smoking status, smoke,that is coded * for never smoked, + for former smoker and for current smoker. -ydefault SPSS will use current smoker as the referent category because current smokerhas the largest numerical (code) value. f you want never smoked to be the referentcategory you need to recode the value for never smoked to a value larger than .

$lthough you can recode the smoking status into the same variable, it is better to recode

the variable into a new/different variable, newsmoke, so you do not lose your original dataif you make an error while recoding.

15

Page 18: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 18/87

emember to save your data set before e!iting SPSS.

18

1. Disp%& "he D" ,!i"or 'in!o'

2. Choose Trnsform

-. Choose Reo!e6. Choose In"o Differen"

Vri$%es...

5. Se%e" "he (ri$%e smoe s "heInpu" (ri$%e

8. ,n"er ne'smoe s "he nme of

"he Ou"pu" (ri$%eA n! "henhoose Chn+e.

7. Choose O%! n! Ne' V%ues...

. Choose V%ue un!er O%! V%ue.

/I" m& %re!& $e se%e"e!.3. ,n"er 1 /o!e for ne(er

smoer

10. Choose V%ue un!er Ne'V%ue. /I" m& %re!& $e

se%e"e!.

11. ,n"er 6 /or n& (%ue +re"er

"hn -12. Choose <!!

1-. Choose <%% O"her V%ues un!er

O%! V%ue.

16. Choose Cop& O%! V%ue/sun!er Ne' V%ue.

15. Choose <!!18. Choose Con"inue

17. Choose O? 

Page 19: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 19/87

Example: Creating Indicator or Dumm Variables

You can use the commands for recoding a variable to create indicator or dummy variablesin SPSS. Suppose you have a variable indicating smoking status, smoke, that is coded * fornever smoked, + for former smoker and for current smoker. 0o create three new

indicator or dummy variables for never, former and current smoking1

Now, you have created a binary indicator variable for never smoker (coded * if neversmoker, 2 if former or current smoker). Ne!t, create a binary indicator variable forformer smoker.

17

1. Disp%& "he D" ,!i"or

'in!o'

2. Choose Trnsform

-. Choose Reo!e

6. Choose In"o Differen"

Vri$%es...

5. Se%e" "he (ri$%e smoe s

"he Inpu" (ri$%e

8. ,n"er ne(ersmoe s "he nme

of "he Ou"pu" (ri$%eA n!"hen hoose Chn+e.

7. Choose O%! n! Ne' V%ues...

. Choose V%ue un!er O%!

V%ue. /I" m& %re!& $e

se%e"e!.

3. ,n"er 1 /o!e (%ue for ne(er

smoer

10. Choose V%ue un!er Ne'

V%ue. /I" m& %re!& $ese%e"e!.

11. ,n"er 1 /"o in!i"e ne(er

smoer12. Choose <!!

1-. Choose <%% O"her V%ues

un!er O%! V%ue.

16. Choose V%ue un!er Ne'

V%ue.

15. ,n"er 0

18. Choose <!!

17. Choose Con"inue

1. Choose O? 

Page 20: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 20/87

Now, you have a created a binary indicator variable for former smoker (coded * if formersmoker, 2 if never or current smoker). 0o create a binary indicator variable for currentsmoker you would use similar commands to those for creating the indicator variable forformer smoke, e!cept that now the value of for smoke is coded as * and all other valuesare coded as 2.

1

1. Disp%& "he D" ,!i"or

'in!o'

2. Choose Trnsform

-. Choose Reo!e

6. Choose In"o Differen"

Vri$%es...5. Se%e" "he (ri$%e smoe s

"he Inpu" (ri$%e

8. ,n"er formersmoe s "he

nme of "he Ou"pu" (ri$%eA

n! "hen hoose Chn+e. /Or

hn+e /e!i" ne(er "o formerA

n! "hen hoose Chn+e.

7. Choose O%! n! Ne' V%ues...

. Choose 11 un!er

O%!Ne' n! "hen hoose

Remo(e.

3. Choose V%ue un!er O%!

V%ue.

10. ,n"er 2 /o!e (%ue for former 

smoer

11. Choose V%ue un!er Ne'

V%ue.

12. ,n"er 1 /"o in!i"e former

smoer

1-. Choose <!!

16. Choose Con"inue

15. Choose O? 

Page 21: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 21/87

Example: Creating a Categorical Variable !rom a Numerical Variable

You can use the commands for recoding a variable to create a categorical variable from a numericalvariable (i.e., group values of the numerical variable into categories). #or e!ample, suppose you havea variable that is the number of pack years smoked, packyrs, and you want to create a categorical

variable with the four categories, 2, 32 to *2, 3*2 to 2, and 32 pack years smoked.

1. Choose Rn+e un!er O%! V%ue.

13. ,n"er 10.01 n! -0 in "he "'o $%n $o4es.

20. Choose V%ue un!er Ne' V%ue

21. ,n"er 2 /"o in!i"e 10 "o -0 p &ers

22. Choose <!!

2-. Choose Rn+eA (%ue "hrou+h ;I*;,ST un!er O%! V%ue.

26. ,n"er -0.01 in "he $%n $o4.

25.Choose V%ue un!er Ne' V%ue

28. ,n"er - /"o in!i"e -0 p &ers

27. Choose <!!

2. Choose Con"inue23. Choose O? 

Note that if you may want to use different coding values depending on which category you want tobe used as the referent category in certain statistical procedures. emember to save your data setbefore e!iting SPSS.

13

1. Disp%& "he D" ,!i"or 'in!o'

2. Choose Trnsform

-. Choose Reo!e

6. Choose In"o Differen" Vri$%es...

5. Se%e" "he (ri$%e p&rs s "he Inpu"

(ri$%e

8. ,n"er nme for "he ne' (ri$%eA

 p"A for "he Ou"pu" (ri$%eA n!

"hen hoose Chn+e.

7. Choose O%! n! Ne' V%ues...

. Choose V%ue un!er O%! V%ue. /I" m&%re!& $e se%e"e!.

3. ,n"er 0

10. Choose V%ue un!er Ne' V%ue.

11. ,n"er 0 /"o in!i"e 0 p &ers

12. Choose <!!

1-. Choose Rn+e un!er O%! V%ue.

16. ,n"er 0.01 n! 10 in "he "'o $%n

 $o4es.

15. Choose V%ue un!er Ne' V%ue

18. ,n"er 1 /"o in!i"e 0 "o 10 p &ers

17. Choose <!!

Page 22: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 22/87

Summarizing 6our "ata

(re;uency !ables .& <ar Charts/ for Categorical $ariables) To pro!ue freuen& "$%es n! $r hr"s for "e+ori% (ri$%es

1. Choose *nalyze from "he menu $r 

2. Choose "escriptive Statistics-. Choose (re;uencies)

6. $ariable.s/ To se%e" "he (ri$%es &ou 'n" from "he soure %is" on "he %ef"A hi+h%i+h"

(ri$%e $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro' %o"e! in "he mi!!%eof "he 'in!o'. Repe" "he proess un"i% &ou h(e se%e"e! %% "he (ri$%es &ou 'n".

5. Choose Charts /Sip "o s"ep 7 if &ou !o no" 'n" $r hr"s.

8. Choose <ar Chart.s/

7. Choose Continue

. Choose : 

4!ample1 #re5uency table and bar chart for the categorical variable, smoking status.

 

#re5uency table and bar chart of smoking status

currentformer never 

Smoking status

60

50

40

30

20

10

0

   P  e  r  c  e  n   t

Smoking status

20

Smoking status isthe selectedvariable(s) and-ar charts under6harts7 hasbeen selected.

Smoking status

Fre-quency Percent

ValidPercent

Cumu-lative

Percent

never    590 59.0 59.0 59.0

former  293 29.3 29.3 88.3

current 11 11. 11. 100.0!otal 1000 100.0 100.0

Page 23: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 23/87

Contingency !ables for Categorical $ariables) To pro!ue on"in+en& "$%es for "e+ori%

(ri$%es

1. Choose *nalyze from "he menu $r.

2. Choose "escriptive Statistics

-. Choose Crosstabs)))

6. Row.s/= Se%e" "he ro' (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen %i on "he

rro' %o"e! ne4" "o "he Ro'/s $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "he ro'

(ri$%es &ou 'n".

5. Column.s/= Se%e" "he o%umn (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen%i on "he rro' %o"e! ne4" "o "he Co%umn/s $o4. Repe" "he proess un"i% &ou h(e

se%e"e! %% "he o%umn (ri$%es &ou 'n".

8. Choose Cells)))

7. Choose "he cell values /e.+.A o$ser(e! oun"sK ro'A o%umnA n! mr+in /"o"% peren"+es.

 No"e "he op"ion is se%e"e! 'hen "he %i""%e $o4 is no" emp"&.

. Choose Continue

3. Choose : 

4!ample1 6ontingency table of smoking status by coronary heart disease (68").

 

Smoking status * Incident CHD Crosstabulation

#ncident C$%

!otalno ye&

'mo(in)&tatu&

never Count   53 53 590* +it,in 'mo(in) &tatu&   91.0* 9.0* 100.0*

former Count   25 36 293

* +it,in 'mo(in) &tatu&   8.* 12.3* 100.0*

current Count   106 11 11

* +it,in 'mo(in) &tatu&   90.6* 9.4* 100.0*

!otal Count   900 100 1000

* +it,in 'mo(in) &tatu&   90.0* 10.0* 100.0*

21

Smoking statusis the rowvariable and 68"is the columnvariable.

%bserved counts

and rowpercentages willbe displayed.

Page 24: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 24/87

"escriptive Statistics .& Histograms/ for 7umerical $ariables. To pro!ue !esrip"i(e

s""is"is n! his"o+rms for numeri% (ri$%es

1. Choose *nalyze on "he menu $r 

2. Choose "escriptive Statistics

-. Choose (re;uencies)))6. $ariable.s/= To se%e" "he (ri$%es &ou 'n" from "he soure %is" on "he %ef"A hi+h%i+h"

(ri$%e $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro' %o"e! in "he mi!!%e

of "he 'in!o'. Repe" "he proess un"i% &ou h(e se%e"e! %% "he (ri$%es &ou 'n".5. Choose "isplay fre;uency tables to turn off the option. No"e "h" "he op"ion is "urne! off

'hen "he %i""%e $o4 is emp"&.

8. Choose Statistics

7. Choose summary measures /e.+.A menA me!inA s"n!r! !e(i"ionA minimumA m4imumAse'ness or ur"osis.

. Choose Continue 

3. Choose Charts /Sip "o s"ep 11 if &ou !o no" 'n" his"o+rms.

10. Choose Histograms.s/11. Choose Continue

12. Choose : 

<n %"ern"e '& "o pro!ue on%& "he !esrip"i(e s""is"is is " s"ep - "o hoose Desrip"i(es...

ins"e! of Freuenies...A "henA se%e" "he (ri$%es &ou 'n". :& !efu%" SPSS ompu"es "hemenA s"n!r! !e(i"ionA minimum n! m4imum. Choose Op"ions... "o se%e" o"her summr&

mesures.

4!ample1 "escriptive summaries and histogram for the numerical variable age.

22

$ge is the variable to summari9e. You canselect more than one variable to analy9e.

emember to turn off the "isplay fre5uencytables option.

Page 25: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 25/87

 

Summaries for $ge

  Statistics

  )e

Valid   1000

/i&&in)   0

/ean   2.14

'td. %eviation   5.25

/inimum   65

/aimum   90

 

8istogram of $ge

95908580506560

Age

120

100

80

60

40

20

0

   F  r  e  q  u  e  n  c  y

/ean 2.14'td. %ev. 5.25

1000

Histogram

2-

ean, standarddeviation, minimumand ma!imum wereselected underStatistics7, and

histogram wasselected under6harts7

Page 26: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 26/87

"escriptive Statistics .& <o'plots/ by Groups for 7umerical $ariables. To pro!ue

!esrip"i(e s""is"is n! $o4p%o"s $& +roups for numeri% (ri$%es

1. Choose *nalyze on "he menu $r 

2. Choose "escriptive Statistics

-. Choose #'plore...6. "ependent 9ist To se%e" "he (ri$%es &ou 'n" "o summriEe from "he soure %is" on "he

%ef"A hi+h%i+h" (ri$%e $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro'

%o"e! ne4" "o "he !epen!en" %is" $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "he(ri$%es &ou 'n".

5. (actor 9ist To se%e" "he (ri$%es &ou 'n" "o use "o !efine "he +roups from "he soure %is"

on "he %ef"A hi+h%i+h" (ri$%e $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he

rro' %o"e! ne4" "o "he f"or %is" $o4.8. Choose Plots))) /If &ou !o no" 'n" $o4p%o"sA hoose S""is"is for "he Disp%& op"ion n!

sip "o S"ep 11.

7. Choose (actor levels together from "he :o4p%o" $o4.

. Se%e" S"em=n!=%ef op"ion from "he Desrip"i(e $o4 "o turn off the option)3. Choose Continue 

10. Choose <oth for "he Disp%& op"ion11. Choose : 

4!ample1  0otal cholesterol by family history of heart attack (yes or no).

 

26

:nder Statistics7"escriptives is usually

selected by default.

:nder Plots select-o!plot option andunselect stem;and;leaf.

n this e!ample total cholesterol isthe dependent variable. You canselect more than one variable.

Summaries will computed for eachgroup defined by family history ofheart attack.

-oth numerical summaries (statistics)and plots are selected.

Page 27: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 27/87

Descriptives

 

Family,i&tory of 

,eartattac( 'tati&tic

'td.rror 

!otalc,ole&terol

no /ean221.93 1.41

  95* Confidence#nterval for /ean

o+er ound 219.15 

77er ound 224.2  

5* !rimmed /ean 221.63

/edian 219.6

Variance 1350.641

'td. %eviation 36.51

/inimum 111

/aimum 363

an)e 252

#nterquartile an)e 49

'(e+ne&& .184 .094

  urto&i& .363 .188

  ye& /ean 220.53 2.150

  95* Confidence#nterval for /ean

o+er ound 216.30 

77er ound 224.6  

-o!plot of 0otal 6holesterol by #amily 8istory of 8eart $ttack

ye&no

Family history o heart attack

400

350

300

250

200

150

100

   !  o   t  a   l  c   h  o   l  e  s   t  e  r  o   l

812

85

659

95

12

438

29

25

0he e!plorecommand by

default producesa lot of differentsummaries, so you need toselect what toreport.

$ll summariesare shown for allgroups < the

table has beencropped in thise!ample.

Page 28: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 28/87

+sing the Split (ile ption for Summaries by Groups for Categorical and 7umerical

$ariables) The Sp%i" Fi%e op"ion in SPSS is on(enien" '& "o pro!ue summriesA +rphsA n!

run s""is"i% proe!ures $& +roups. To "i("e "he op"ion

1. Choose D" on "he menu $r of "he D" ,!i"or 'in!o'

2. Choose Sp%i" Fi%e-. Choose Compre +roups or Or+niEe ou"pu" $& +roups. The "'o op"ions !isp%& "he ou"pu"

!ifferen"%&. Tr& eh op"ion "o see 'hih 'ors $es" for &our nee!s.

6. Choose "he (ri$%e "h" !efines "he +roups.5. Choose O? 

 No'A %% "he summriesA +rphsA n! s""is"i% proe!ures &ou reues" 'i%% $e !one

/u"om"i%%& for eh +roup. To "urn off "his op"ion

1. Choose D" on "he menu $r of "he D" ,!i"or 'in!o'

2. Choose Sp%i" Fi%e

-. Choose <n%&Ee %% sesA !o no re"e +roups6. Choose O? 

4!ample. :se the Split #ile option to run summaries by family history of heart attack (yes

or no).

28

6ompare groups option will try todisplay the results for each groupside by side when feasible.

%rgani9e output by groups optionwill display the results separatelyfor each group starting with thegroup with the lowest numericalcode value.

Page 29: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 29/87

+sing the Select Cases ption for Summaries for a subgroup of sub>ects%observations)

The Se%e" Cses op"ion in SPSS is on(enien" '& "o pro!ue! summries n! run s""is"i% proe!ures for su$+roup of su$9e"s or "o "emporr& e4%u!e su$9e"s from "he n%&sis. To

"i("e "his op"ion

1. Choose D" on "he menu $r of "he D" ,!i"or 'in!o'2. Choose Se%e" Cses)

-. Choose If on!i"ion is s"isfie!

6. Choose If)5. ,n"er "he e4pression "h" in!i"es "he su$9e"so$ser("ion &ou 'n" "o se%e".

8. Choose Con"inue

7. Choose O? 

 No'A %% "he summriesA +rphsA n! s""is"i% proe!ures &ou reues" 'i%% $e !one usin+ on%&

"he se%e"e! su$9e"so$ser("ions. To "urn off "his op"ion

1. Choose D" on "he menu $r of "he D" ,!i"or 'in!o'

2. Choose Se%e" Cses)-. Choose <%% ses

6. Choose O? 

4!ample1 Select sub=ects not lipid lowering medications (i.e., sub=ects with lipid > 2

indicating no medications).

27

Select the f condition is satisfied and then f7

Caution"  :sually you do not want to deleteobservations from your dataset, so do not selectthis option.

0ypical e!pressions will involvecombinations of the following symbols1

Symbol "efinition  > e5ual  ?> not e5ual  3> greater than or e5ual  @> less than or e5ual  3 greater than  @ less than  A and  B or

Page 30: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 30/87

Graphing 6our "ata

ou n pro!ue (er& fn& fi+ures n! +rphs in SPSS. Pro!uin+ fn& fi+ures n! +rphs is $e&on! "he sope of "his hn!ou". Ins"ru"ions on pro!uin+ fi+ures n! +rphs n $e foun! in

SPSS ;e%p un!er Topis Con"en"s Chr" *%%eriesA S"n!r! Chr"sA n! Chr" ,!i"orA s

'e%% s in "he SPSS Tu"ori%s un!er Cre"in+ n! ,!i"in+ Chr"s. The ommn!s for min+hr"s re %o"e! un!er *rphs /n! "hen Be+& Di%o+sA if usin+ Version 15 on "he menu $rA

n! "he ommn!s for min+ simp%e fi+ures n! +rphs re re%"i(e%& es& "o use n! some

ins"ru"ion is +i(en $e%o'. The In"er"i(e op"ion un!er *rphs is no"her '& "o pro!ue hr"sin SPSS in"er"i(e%&A s 'e%% s fnier (ersions of "he $si hr"s /e.+.A -=!imension% $r

hr"s.

<ar Charts

The esies" '& "o pro!ue simp%e $r hr"s is "o use "he :r Chr" op"ion 'i"h "he

Freuenies... ommn!. See Freuen& T$%es /# :r Chr"s for C"e+ori% Vri$%es. ou

n on%& pro!ue on%& one $r hr" " "ime usin+ "he :r ommn!.

1. Choose Graphs /# "hen 9egacy "ialogsA if Version 15 from "he menu $r.2. Choose <ar)))

-. Choose Simple5 Clustered5 or Stac8ed

6. Choose 'h" "he data in the bar chart represen" /e.+.A summries for +roups of ses.

5. Choose "efine

8. Select a variable from "he (ri$%e %is" on "he %ef" n! "he %i on "he rro' ne4" "o "he

C"e+or& 4is.

7. Choose 'h" "he bars represent /e.+.A num$er of ses or peren"+e of ses. Choose : 

currentormer never 

Smoking status

"#$#%

&#$#%

'#$#%

(#$#%

)#$#%

*#$#%

#$#%

   P  e  r  c  e  n   t

currentormer never 

Smoking status

"#$#%

&#$#%

'#$#%

(#$#%

)#$#%

*#$#%

#$#%

  P  e  r  c  e  n  t

yes

no

Family history oheart attack

2

Page 31: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 31/87

Histograms

The esies" '& "o pro!ue simp%e his"o+rms is "o use "he ;is"o+rm op"ion 'i"h "heFreuenies... ommn!. See Desrip"i(e S""is"is /# ;is"o+rms for Numeri% Vri$%es.

ou n pro!ue on%& one his"o+rm " "ime usin+ "he ;is"o+rm ommn!.

&#'#(#)#*#

+ody mass inde,

*)#

*##

-#

"#

'#

)#

#

   F  r  e  q  u  e  n  c  y

.ean /)"$)(""Std$ Dev$ /'$-""0

1 /*2###

<o'plots

The esies" '& "o pro!ue simp%e $o4p%o"s is "o use "he :o4p%o" op"ion 'i"h "he ,4p%ore...ommn!. See Desrip"i(e S""is"is /# :o4p%o"s :& *roups for Numeri% Vri$%es.

ou n pro!ue on%& one $o4p%o" " "ime usin+ "he :o4p%o" ommn!.

diabeticimpaired astingglucose

normal

ADA diabetes status

'##

)##

#

   S  e  r  u  m      a

  s   t   i  n  g  g   l  u  c  o  s  e

85

880

684

63

23

0) Choose Graphs /# "hen 9egacy

"ialogsA if Version 15 from "he menu $r.

1) Choose <o'plot)))

2) Choose Simple or Clustered

3) Choose 'h" "he data in the

bo'plots represent /e.+.A summriesfor +roups of ses.

4) Choose "efine

?) Select a variable from "he (ri$%e

%is" on "he %ef" n! "hen %i on "herro' ne4" "o "he Vri$%e $o4.

@) Select the variable from "he (ri$%e%is" "h" defines the groups n! "hen%i on "he rro' ne4" "o C"e+or&

<4is.

A) Choose : 

0) Choose Graphs /# "hen 9egacy

"ialogsA if Version 15 from "he menu

 $r 

1) Choose Histogram)))

2) Select a variable from "he (ri$%e

%is" on "he %ef" n! "hen %i on "he

rro' in "he mi!!%e of "he 'in!o'.

3) Choose Disp%& norm% Cur(e if &ou

'n" norm% ur(e superimpose! on

"he his"o+rm.

4) Choose : 

Page 32: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 32/87

7ormal Probability Plots) To pro!ue Norm% pro$$i%i"& p%o"s

1. Choose Graphs /# "hen 9egacy "ialogsA if Version 15 from "he menu $r.2. Choose B,B))) "o +e" p%o" of "he un"i%es /Q=Q p%o" or hoose P,P))) "o +e" p%o" of "he

umu%"i(e propor"ions /P=P p%o"

-. Select the variables from "he soure %is" on "he %ef" n! "hen %i on "he rro' %o"e! in "hemi!!%e of "he 'in!o'.

6. Choose 7ormal s "he Tes" Dis"ri$u"ion. The Norm% !is"ri$u"ion is "he !efu%" Tes"

Dis"ri$u"ion. O"her Tes" Dis"ri$u"ions n $e se%e"e! $& %iin+ on "he !o'n rro' n!%iin+ on "he !esire! Tes" !is"ri$u"ion.

5. Choose : 

SPSS 'i%% pro!ue $o"h Norm% pro$$i%i"& p%o" n! !e"ren!e! Norm% pro$$i%i"& p%o" foreh se%e"e! (ri$%e. Usu%%& "he Q=Q p%o" is "he mos" usefu% for ssessin+ if "he !is"ri$u"ion of 

"he (ri$%e is ppro4im"e%& Norm%.

"##'##)###3)##

4bserved 5alue

)&#

)##

*&#

*##

&#

#

3&#

   6  ,  p  e  c   t  e   d   1  o  r  m  a   l   5  a   l  u  e

1ormal 737 Plot o Serum asting glucose

&#'#(#)#*#

4bserved 5alue

'#

(#

)#

*#

   6  ,  p  e  c   t  e   d   1  o  r  m  a   l   5  a   l  u  e

1ormal 737 Plot o +ody mass inde,

-0

Page 33: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 33/87

#rror <ar Plot) To pro!ue n error $r p%o" of "he men of numeri% (ri$%e /or "he mens

for !ifferen" +roups of su$9e"s

0) Choose Graphs /# "hen 9egacy "ialogsA if Version 15 from "he menu $r.

1) Choose #rror <ar)))

2) Choose Simple or Clustered3) Choose 'h" "he data in the error bars represent /e.+.A summries for +roups of ses.

4) Choose "efine

?) Select a variable from "he (ri$%e %is" on "he %ef" n! "hen %i on "he rro' ne4" "o "heVri$%e $o4.

@) Select the variable from "he (ri$%e %is" "h" defines the groups n! "hen %i on "he rro'

ne4" "o C"e+or& <4is.

A) Se%e" 'h" "he $rs represen" /e.+.A onfi!ene in"er(%A s"n!r! !e(i"ionA s"n!r! errorof "he men

) Choose : 

 

,rror :r P%o"

diabeticimpaired astingglucose

normal

ADA diabetes status

(##

)&#

)##

*&#

*##

&#

   .  e  a  n   8  3   )   S   D   S  e  r  u  m      a  s   t   i  n  g  g   l  u  c  o  s  e

 

< $r hr" of "he men 'i"h error $rs n $e m!e

usin+ "he ommn!s for min+ $r hr"

 ADA diabetes status

diabeticimpaired astingglucose

normal

   .  e  a  n   S  e  r  u  m      a  s   t   i  n  g  g   l  u  c  o  s  e

(##

)##

*##

#

6rror bars9 8:3 ) SD

-1

Page 34: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 34/87

Scatter Plot) To pro!ue s""er p%o" $e"'een "'o numeri% (ri$%es

&#'#(#)#*#

+ody mass inde,

*'#

*)#

*##

-#

"#

'#

)#

#

   H   D   ;  c   h  o   l  e  s   t  e  r  o   l

H;D cholesterol vs +.I

*dding a linear regression line to a scatter plot) To !! %iner re+ression /%es"=sures %ine

"o s""er p%o" of "'o numeri% (ri$%es

&#'#(#)#*#

+ody mass inde,

*'#

*)#

*##

-#

"#

'#

)#

#

   H   D   ;  c   h  o   l  e  s   t  e  r  o   l

H;D cholesterol vs +.I

'q inear 0.121

 <!!i"ion% op"ionso Choose >en un!er Confi!ene In"er(%s /in "he Proper"ies 'in!o' "o !! pre!i"ion

in"er(% for "he %iner re+ression %ine "o "he s""er p%o" or 

o Choose In!i(i!u% un!er Confi!ene In"er(%s "o !! pre!i"ion in"er(% for in!i(i!u%

o$ser("ions "o "he s""er p%o".

8. C%i on "he JJ in "he upper ri+h" hn! orner of "he Chr" ,!i"or 'in!o' or hoose Fi%eA

n! "hen C%ose "o re"urn "o "he Vie'er 'in!o'.

-2

1. Choose Graphs /# "hen 9egacy

"ialogsA if Version 15 on "he menu

 $r.2. Choose Scatter%"ot...

-. Choose Simple

6. Choose "efine

5. 6 *'is Se%e" "he & (ri$%e &ou 'n"

from "he soure %is" on "he %ef" n! "hen

%i on "he rro' ne4" "o "he & 4is $o4.

8. D *'is Se%e" "he 4 (ri$%e &ou 'n"

from "he soure %is" on "he %ef" n! "hen

%i on "he rro' ne4" "o "he 4 4is $o4.

7. Choose !itles...

. ,n"er "i"%e for "he p%o" /e.+.A & (s. 4.3. Choose Continue 

10. Choose : 

1. Whi%e in "he Vie'er 'in!o' !ou$%e

%i on "he s""er p%o". The s""er

 p%o" shou%! no' $e !isp%&e! in

'in!o' "i"%e! Chr" ,!i"or.2. Choose ,%emen"s.

-. Choose Fi" Bine " To"%. /< %ineshou%! $e !!e! "o "he p%o"A $euse

"he ne4" 2 s"eps re "he !efu%" op"ions.

6. Choose Biner /in "he Proper"ies'in!o'

5. Choose <pp%& /in "he Proper"ies

'in!o'.

Page 35: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 35/87

*dding a 9oess .scatter plot/ smooth to a scatter plot. To !! Boess smoo"h "o s""er p%o"

of "'o numeri% (ri$%es

&#'#(#)#*#

+ody mass inde,

*'#

*)#

*##

-#

"#

'#

)#

#

   H   D   ;  c   h  o   l  e  s   t  e  r  o   l

H;D cholesterol vs +.I

Stem,and,leaf Plot) To pro!ue s"em=n!=%ef p%o"

--

1. Choose <n%&Ee on "he menu $r 2. Choose Desrip"i(e S""is"is

-. Choose ,4p%ore...6. Depen!en" Bis" To se%e" "he (ri$%es &ou

'n" from "he soure %is" on "he %ef"Ahi+h%i+h" (ri$%e $& poin"in+ n! %iin+

"he mouse n! "hen %i on "he rro'

%o"e! ne4" "o "he !epen!en" %is" $o4.Repe" "he proess un"i% &ou h(e se%e"e!

%% "he (ri$%es &ou 'n".

5. Choose P%o"s...8. Choose S"em=n!=%ef from "he Desrip"i(e

 $o4. No"e "he op"ion m& %re!& $e

se%e"e! if "he %i""%e $o4 is no" emp"&.7. Choose None from "he :o4p%o" $o4. Choose Con"inue

3. Choose P%o"s for "he Disp%& op"ion

10. Choose O? 

Severity of Illness Index Stem-and-

Leaf Plot

 Frequency Stem & Leaf

  2.00 4 . 34

  .00 4 . !!"""##

  $0.00 % . 000$$$2344

  3.00 % . %!"

  $.00 xtremes '()!2*

 Stem +idt, $0.00

 ac, leaf $ case's*

1. Whi%e in "he Vie'er 'in!o' !ou$%e%i on "he s""er p%o". The s""er

 p%o" shou%! no' $e !isp%&e! in

'in!o' "i"%e! Chr" ,!i"or.2. Choose ,%emen"s.

-. Choose Fi" Bine " To"%.

6. Choose Boess /in "he Proper"ies'in!o'. Defu%" op"ions for of

 poin"s "o fi" /50 n! erne%

/,pnehnio( re usu%%& "he mos"ppropri"e op"ions.

5. Choose <pp%& /in "he Proper"ies

'in!o'. If %ine 's !!e! "o "he

 p%o" in S"ep -A i" 'i%% $e rep%e! $&

"he %oess smoo"h.8. C%i on "he JJ in "he upper ri+h"

hn! orner of "he Chr" ,!i"or'in!o' or hoose Fi%eA n! "hen C%ose

"o re"urn "o "he Vie'er 'in!o'.

0.

Page 36: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 36/87

Hypothesis !ests & Confidence -ntervals

ne,Sample t !est

1. Choose *nalyze from "he menu $r.

2. Choose Compare eans-. Choose ne,Sample ! !est)))

6. !est $ariable.s/= Se%e" "he (ri$%e &ou 'n" from "he soure %is" on "he %ef"A hi+h%i+h"

(ri$%es $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro' %o"e! in "he

mi!!%e of "he 'in!o'.

5. #dit the !est $alue. The Tes" V%ue is "he (%ue of "he men un!er "he nu%% h&po"hesis. The!efu%" (%ue is Eero.

8. Choose : 

Confidence -nterval for a ean .from one sample of data/

1. Choose *nalyze from "he menu $r.

2. Choose Compare eans-. Choose ne,Sample ! !est)))

6. !est $ariable.s/= Se%e" "he (ri$%e &ou 'n" from "he soure %is" on "he %ef"A hi+h%i+h"(ri$%es $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro' %o"e! in "he

mi!!%e of "he 'in!o'.

5. !he !est $alue should be EA 'hih is "he !efu%" (%ue.

8. :& !efu%" 35 onfi!ene in"er(% 'i%% $e ompu"e!. Choose Op"ions) "o hn+e "heonfi!ene %e(e%.

7. Choose : 

#ID# Example. 0here were CD S"S cases in Eing 6ounty, Fashington, during the years*GHC and *GHI. 0he birth weights (in grams) of these CD cases were1

+CJJ GC* +D2H **D +2GD *HI*H HC+ 2J+ 2 +I I*I+2* I*I +J2 +DG+ *J*J CC++HI2 +D2H +D2H 22I HC IH++H++ +CGI CIG HC *GDC +CGI22I +J2D +I CGC ++ 2J++2* +II* +GHH **D +JH *I2

+H++ +DJ +2* ++ +DJ +CD

Fe want to know if the mean birth weight in the population of S"S infant is differentfrom that of normal children, 22 grams. Fe could construct a GIK confidence inter$al,to see if the interval contains the value of 22 grams or we could perform a one sample t

test to test if the mean in the S"s population is e5ual to 22 (versus not e5ual to 22).

-6

0he mean (and standard deviation)of these measurements is +DG*(J+) grams.

Page 37: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 37/87

To ons"ru"  4F confidence interval

4ne3Sample Statistics

  /ean 'td. %eviation'td. rror 

/ean

:irt, +ei),t   48 2891.1250 623.391 89.9885

4ne3Sample !est

 

!e&t Value 0

t df 'i). ;2-tailed</ean

%ifference

95* Confidence #ntervalof t,e %ifference

o+er 77er  

:irt, +ei),t   32.131 4 .000 2891.12500 210.1109 302.1391

-5

Fhen computing the

interval for a mean makesure the 0est &alue is 2.

gnore the t test results (t,

df, sig.) because theseresults are for testing if themean birth weight is e5ual to2 (versus not e5ual to 9ero).

%&' confidence inter$al for temean birt weigt is *+, to

-,* rams

Number of sub=ects, mean, standarddeviation, and standard error of themean.

Page 38: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 38/87

To perform one sample t test "o "es" if "he men in "he SIDs popu%"ion is eu%

"o --00 (ersus no" eu% "o --00.

4ne3Sample Statistics

  /ean 'td. %eviation'td. rror 

/ean

:irt, +ei),t   48 2891.1250 623.391 89.9885

4ne3Sample !est

 

!e&t Value 3300

t df 'i). ;2-tailed</ean

%ifference

95* Confidence #ntervalof t,e %ifference

o+er 77er  

:irt, +ei),t   -4.544 4 .000 -408.8500 -589.8891 -22.8609

-8

0o run the one;sample t testto test if the mean birthweight is e5ual to 22 youneed to change the 0est&alue from the default valueof 2 to 22.

gnore the results for GIKconfidence interval of thedifference, because it is theconfidence interval for themean minus 22.

#ig. (/tailed) 0 two tailed p/$alue 0 1.,,+

t > test statistic value > ;C.ICC

df > de rees of freedom > CH

Page 39: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 39/87

Paired t !est

1. Choose *nalyze from "he menu $r.2. Choose Compare eans

-. Choose Paired,Samples ! !est)))

6. Paired $ariable.s/= Se%e" "'o pire! (ri$%es &ou 'n" from "he soure %is" on "he %ef"A

hi+h%i+h" $o"h (ri$%es $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro'%o"e! in "he mi!!%e of "he 'in!o'. Repe" "he proess un"i% &ou h(e se%e"e! %% "he

 pire! (ri$%es &ou 'n" "o "es".5. Choose : 

Confidence -nterval for the "ifference <etween eans from Paired Sample

:& !efu%" 35 onfi!ene in"er(% for "he !ifferene mens of "he pire! smp%es 'i%% $e

ompu"e! 'hen performin+ pire! " "es". Choose Op"ions) "o hn+e "he onfi!ene %e(e%.

2ro3ac Example. 0o compare the effect of Pro9ac on an!iety *2 sub=ects are given oneweek of treatment with Pro9ac and one week of treatment with a placebo. 0he order ofthe treatments was randomi9ed for each sub=ect. $n an!iety 5uestionnaire was used tomeasure a sub=ectLs an!iety on a scale of 2 to 2. 8igher scores indicate more an!iety.

Sub=ect Placebo Pro9ac "ifference

* ++ *G

+ *D ** H

*H *C C *G *H +

I ++ + ;*

J *+ ** *

H *C *I ;*

D ** *G ;D

G *G ** D

*2 H D ;*

ean difference, 1.-d   =

Standard deviation,6.5=

d  s

-7

Page 40: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 40/87

Paired t test n! confidence interval for "he !ifferene $e"'een pire! mens.

Paired Samples Statistics

  /ean 'td. %eviation'td. rror 

/ean

Pair 1 7lace:o   16.1000 10 4.95424 1.56667ro=ac   14.8000 10 4.68568 1.4814

Paired Samples Correlations

  Correlation 'i).

Pair 1 7lace:o > 7ro=ac   10 .556 .095

Paired Samples !est

  Paired %ifference& t df  'i). ;2-tailed<

  /ean'td.

%eviation'td. rror 

/ean95* Confidence #nterval of 

t,e %ifference

o+er 77er

Pair 1 7lace:o- 7ro=ac

  1.30000 4.5428 1.4398 -1.95293 4.55293 .904 9 .390

-

Summaries for eachsample of data (or

variable).

6orrelation between the pairedvalues ; usually not useful.

difference > placebo ; pro9ac

mean difference > *.

standard deviation of thedifferences > C.I

standard error of thedifferences > *.C

 

%&' confidence inter$al for te

mean difference is /+.% to 4.5

2aired t test

#ig. ( tailed) 0 two/sided p/$alue 0 ,.-%

t > test statistic value > .G2C

df > degrees of freedom

0he order of the variables in

calculating the difference isdetermined by the order of thevariables in the data set (and notthe order in which you select thevariables).

Page 41: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 41/87

!wo,Sample t !est

1. Choose *nalyze on "he menu $r.2. Choose Compare eans

-. Choose -ndependent,Samples ! !est)))

6. !est $ariable.s/= Se%e" "he "es" (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen

%i on "he rro' %o"e! ne4" "o "he "es" (ri$%e $o4. Repe" "he proess un"i% &ou h(ese%e"e! %% "he (ri$%es &ou 'n".

5. Grouping $ariable= Se%e" "he (ri$%e 'hih !efines "he +roups n! "hen %i on "he rro'%o"e! ne4" "o "he +roupin+ (ri$%e $o4.

8. Choose "efine Groups)))

7. C%i on $%n $o4 ne4" "o *roup 1A "hen enter the code value .numeric or

character%string/ for group 0.. C%i on $%n $o4 ne4" "o *roup 2A "hen enter the code value .numeric or

character%string/ for group 1)

3. Choose Continue 10. Choose : 

Confidence -nterval for the "ifference <etween eans from -ndependent

Samples

:& !efu%" 35 onfi!ene in"er(% for "he !ifferene mens from "'o in!epen!en" smp%es

'i%% $e ompu"e! 'hen performin+ "'o smp%e " "es". Choose Op"ions) "o hn+e "he

onfi!ene %e(e%.

6odel Cities Example. 0wo groups of people were studied ; those who had been randomly

allocated to a #ee;#or;Service medical insurance group and those who had been randomlyallocated to a Prepaid insurance group.

Fe would like to compare the two groups on the 5uality of health care they received ineach group, but first we would like to know how comparable the groups are on othercharacteristics that might affect medical outcome. #or e!ample, we would like to know ifthe mean age in the two groups is similar. 8opefully, the process of random allocationminimi9es this possibility, but there is always a chance that it didnLt.

'roup n ean Standard deviationPrepaid ('86) **JH +C.2 *I.

#ee;for;service (E6) +2H +J.C *H.*

Fe could compare the average age between the two groups using a two sample t test or aconfidence interval for the difference between the average ages of the two groups.

-3

Page 42: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 42/87

!wo sample t test n! 4F confidence interval for "he !ifferene $e"'een mens

/from in!epen!en" smp%es. 

!3!est<roup Statistics

  7rov /ean 'td. %eviation'td. rror 

/ean

a)e ?$C   116 23.9846 15.308 .44810

C/   320 26.366 1.10260 .30200

Independent Samples !est

 evene@& !e&t for 

quality of Variance&

  F 'i).

a)e qual variance&a&&umed   4.068 .000

  qual variance&not a&&umed  

60

$fter you select the 'rouping &ariable,SPSS will put in 5uestion marks to prompt you to define the code values for the twogroups. Select "efine 'roups7 to enterthe code values.

n this e!ample the group codes arenumeric, 2 (for '86) and * (for E6)

Summaries for eachsample/group.

SPSS by default tests if thevariances are e5ual using eveneMs

test. $ small p;value (sig.) indicatesthe variances may be different.

sig. > p;value > @.22*

# > test statistic value > CH.2

Page 43: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 43/87

Independent Samples !est

  t-te&t for quality of /ean&

  t df 'i). ;2-tailed</ean

%ifference'td. rror %ifference

a)e qual variance&a&&umed   -4.188 432 .000 -2.38306 .56896

  qual variance&not a&&umed   -4.410 2293.698 .000 -2.38306 .5403

Independent Samples !est

 95* Confidence #nterval

of t,e %ifference

  o+er 77er  

a)e qual variance&a&&umed   -3.49851 -1.2660

  qual variance&not a&&umed   -3.4423 -1.32338

61

Two #ample t test. SPSS by default always performs both versions of the twosample t test assuming e5ual variance and une5ual variances

#ig. ( 7 tailed) 0 two sided p/$alue 0 1.,,+ (e8ual $ar.)9 1.,,+ (une8ual $ar.)

t > test statistic value > ;C.+ (e5ual var.), ;C.C (une5ual var.)

df > degrees of freedom > CH+ (e5ual var.), ++GC (une5ual var.)

mean difference > difference between means > ;+.C (e5ual and une5ual var.)

std. error difference > standard error of the difference between means > .J (e5ualvar.), .I (une5ual var.)

%&' confidence inter$al for

te difference between means

is

/-.4 to /+.- (assuming e8ual

$ariances)

/-.4 to /+.- (assuming une8ual

Page 44: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 44/87

Sign !est and Wilco'on Signed,Ran8 !est

1. Choose *nalyze from "he menu $r.2. Choose 7onparametric !ests

-. Choose 1 Related Samples)))

6. !est Pair.s/ 9ist= Se%e" "'o pire! (ri$%es &ou 'n" from "he soure %is" on "he %ef" hn!

si!eA hi+h%i+h" $o"h (ri$%es $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro'%o"e! in "he mi!!%e of "he 'in!o'. Repe" "he proess un"i% &ou h(e se%e"e! %% "he

 pire! (ri$%es &ou 'n" "o "es".5. Choose Sign s "he Tes" T&pe.

8. or

7. Choose Wilco'on s "he Tes" T&pe.

. Choose O? 

spirin Example. 0o compare + types of $spirin, $ and -, * hour urine samples werecollected from *2 people after each had taken either $ or -. $ week later the sameroutine was followed after giving the otherO type to the same *2 people.

Person 0ype $ 0ype - "ifference

* *I * +

+ +J +2 J

* *2

C +D +* H

I *H *H 2

J +2 ++ ;+H H I +

D J 2 J

G *+ H I

*2 *D ** H

ean > *G.+ *I.J  .J > d 

Standard deviation > D.J H.HD  .2GD > d  s

$ Sign test or Filco!on Signed ank test could be used to compare the two types of

$spirin.

62

Page 45: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 45/87

Descriptive Statistics

  /ean 'td. %eviation /inimum /aimum

Percentile&

25t, 50t, ;/edian< 5t,

a&7irina   10 19.2000 8.62554 .00 36.00 12.500 1.5000 26.500

a&7irin:   10 15.6000 .46 5.00 30.00 9.2500 15.0000 21.250

Sign !estFrequencies

  a&7irin: - a&7irina e)ative

%ifference&;a<  8

Po&itive%ifference&;:<

  1

!ie&;c<   1

!otal   10

a a&7irin: A a&7irina: a&7irin: B a&7irinac a&7irin: a&7irina

!est Statistics=b>

 a&7irin: -a&7irina

act 'i). ;2-tailed<   .039;a<

a inomial di&tri:ution u&ed.: 'i)n !e&t

6-

0he order of the variables incalculating the difference isdetermined by the order of thevariables in the data set (and notthe order in which you select thevariables).

Select Filco!on or Sign (or both)

:nder %ptions you can select summaries"escriptive (n, mean, etc.) and uartiles(median, +Ith and HIth percentile)

#ign Test

4!act sig. (+;tailed) > exact9 two/sided

p/$alue 0 ,.,-%

0he p;value is e!act because it iscomputed using the -inomialdistribution instead of using anappro!imation to the Normaldistribution.

Page 46: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 46/87

?ilco,on Signed @anks !est@anks

  /ean an( 'um of an(&

a&7irin: - a&7irina e)ative an(&   8;a< 5.38 43.00

Po&itive an(&   1;:< 2.00 2.00

!ie&   1;c<

!otal   10

a a&7irin: A a&7irina: a&7irin: B a&7irinac a&7irin: a&7irina

!est Statistics=b>

 a&7irin: -a&7irina

  -2.442;a<

 &ym7. 'i). ;2-tailed<   .015

a a&ed on 7o&itive ran(&.: Dilcoon 'i)ned an(& !e&t

66

;ilcoxon #igned Ran< Test

$symp. Sig. (+;tailed) > two sided p/$alue 0 ,.,+&

$symp. is an abbreviation for asymptotic, which

means the p;value is computed using a large sampleappro!imation based on the Normal distribution.

nformation usedin the teststatistic < notusually reportedQuse the previous

descriptives.

Page 47: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 47/87

ann,Whitney + !est .or Wilco'on Ran8 Sum !est/

1. Choose *nalyze on "he menu $r.

2. Choose 7onparametric !ests

-. Choose 1 -ndependent Samples)))

6. !est $ariable.s/= Se%e" "he "es" (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen%i on "he rro' %o"e! ne4" "o "he "es" (ri$%e $o4. Repe" "he proess un"i% &ou h(e

se%e"e! %% "he (ri$%es &ou 'n".5. Grouping $ariable= Se%e" "he (ri$%e 'hih !efines "he +roupin+ n! "hen %i on "he

rro' %o"e! ne4" "o "he +roupin+ (ri$%e $o4. The +roupin+ (ri$%e mus" $e numeri for

"he (ri$%e "o pper on "he %ef" hn! si!e.8. Choose "efine Groups)))

7. C%i on "he $%n $o4 ne4" "o +roup 1A "hen enter the code value .it must be numeric/ for

group 0.. C%i on "he $%n $o4 ne4" "o +roup 2A "hen enter the code value .it must be numeric/ for

group 1.

3. Choose Continue "o re"urn "o T'o In!epen!en" Smp%es !i%o+ $o4.10. Choose ann,Whitney + s "he Tes" T&pe. No"e "h" "he op"ion m& %re!& $e se%e"e! if

"he %i""%e $o4 is no" emp"&.

11. Choose : 

=egionnaires Example. "uring Ruly and $ugust, *GHJ, a large number of egionnairesattending a convention died of mysterious and unknown cause. 6hen et al. (*GHH) e!aminedthe hypothesis of nickel contamination as a to!in. 0hey e!amined the nickel levels in thelungs of nine cases and nine controls. 0here was no attempt to match cases and controls.0he data are as follows (g/*22g dry weight)1

egionnaire cases JI +C I+ DJ *+2 D+ GG DH *G6ontrols *+ *2 * J I I +G G *+

0he ann Fhitney : test could be used to compare the two groups.

65

$fter you select the 'rouping &ariable,SPSS will put in 5uestion marks toprompt you to define the code values

for the two groups. Select "efine'roups7 to enter the code values.

Note1 0he codes must be numeric,otherwise the grouping variable will notappear on the left hand side.

Page 48: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 48/87

.ann3?hitney !est@anks

  )rou7 /ean an( 'um of an(&

nic(el 1   9 13.8 124.00

2   9 5.22 4.00

!otal   18

!est Statistics=b>

  nic(el

/ann-D,itney   2.000Dilcoon D   4.000

  -3.403

 &ym7. 'i). ;2-tailed<   .001

act 'i). E2;1-tailed'i).<G   .000;a<

a ot corrected for tie&.: ?rou7in) Varia:leH )rou7

68

n this e!ample the group codes are* for legionnaires and + for controls.

nformation used in the teststatistic < not usually reported.0he descriptives under %ptionsare not usefulQ you can producerelevant descriptives (e.g. medianand inter5uartile range for eachgroup) using the 4!plore command.

6ann ;itne test

$symp. Sig. (+;tailed) > two/sided p/$alue 0

,.,,+

0his p;value is computed based a largesample appro!imation to the Normaldistribution and it corrects for ties in thedata, if present.

4!act Sig. T+U(*;tailed Sig.)V > two/sided p/

$alue 0 1.,,+

0his p;value is an e!act p;value, but it doesnot correct for ties in the data, if present.

n this e!ample, given the small sample si9esand few ties in the data, the e!act p;value

Page 49: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 49/87

ne,way *7$* .*nalysis of $ariance/ /,.+.A "o ompre "'o or more mens

from "'o or more in!epen!en" smp%es1. Choose *nalyze on "he menu $r 

2. Choose Compare eans

-. Choose ne,Way *7$*)))

6. "ependent Se%e" "he (ri$%e from "he soure %is" on "he %ef" for 'hih &ou 'n" "o use "oompre "he +roups n! "hen %i on "he rro' ne4" "o "he !epen!en" (ri$%e $o4. ou run

mu%"ip%e one='& <NOV<s $& se%e"in+ more "hn one !epen!en" (ri$%e.

5. (actor Se%e" "he (ri$%e from "he soure %is" on "he %ef" 'hih !efines "he +roups.8. Choose : 

To perform pir'ise omprisons "o !e"ermine 'hih +roups re !ifferen" 'hi%e on"ro%%in+ formu%"ip%e "es"in+ use "he Pos" ;o... op"ion. There re mn& me"ho!s "o hoose from /e.+.A

:onferroni n! R=,=*=W=Q.

O"her usefu% op"ions n $e foun! un!er Op"ions... For e4mp%eA hoose Desrip"i(e "o +e"

!esrip"i(e s""is"is for eh +roup /e.+.A menA s"n!r! !e(i"ionA minimum (%ueA n!m4imum (%ue. Choose ;omo+enei"&=of=(rine "o perform "he Be(ene Tes" "o "es" if "he

+roup (rines re %% eu% (ersus no" %% eu%. < sm%% p=(%ue for "he Be(enes Tes" m&in!i"e "h" "he (rines re no" %% eu%.

C>D Example. Fe can use one;way $N%&$ to compare 8" levels between sub=ects withdifferent hypertensive status (2>normotensive, *>borderline, +>definite)

8ypertensive Standard'roup n ean "eviation

Normotensive *IJD II.D *I.I-orderline ICH II.H *J.+"efinite **2 I.I *I.+

67

You can select * or more variables tocompare between groups.

0he variable selected as the #actordefines the groups. 0he variable can benumeric or character/string.

Page 50: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 50/87

4neayA145A

$% c,ole&terol

'um of 'quare& df /ean 'quare F 'i).

et+een ?rou7&   4344.834 2 212.41 9.045 .000Dit,in ?rou7&   821904.5 3422 240.183

!otal   826249.411 3424

Descriptives

$% c,ole&terol

/ean 'td.%eviation 'td.rror  95* Confidence #nterval for /ean /inimum /aimum

  o+er ound 77er ound

normoten&ive   1568 55.82 15.500 .391 55.05 56.59 21 138

:orderline   54 55.6 16.202 .693 54.30 5.03 24 149

definite   1310 53.4 15.192 .420 52.64 54.29 15 129

!otal   3425 54.90 15.534 .265 54.38 55.42 15 149

6

?ne/wa analsis of $ariance

#ig. 0 p/$alue 0 1.,,+

# > test statistic > G.2Q df > degrees of freedom

Sometimes the test statistic and degrees of freedom of the test statistics are

reported along with the p;valueQ in this e!ample, #>G.2 with degrees of freedom +and C++. Sum of s5uares and mean s5uare are used to compute the test statisticQthey are usually not reported.

:nder %ptions you can re5uest "escriptives for each group to becomputed. 0his information can be used to describe the differencesbetween the groups.

Page 51: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 51/87

Post Hoc !ests:nder Post 8oc7 you can re5uest further comparisons be done between each of thepossible pair of groups to determine which groups are different from each other. 0heseare multiple comparison procedures, which control for the number of tests/comparisonbeing performed. 0here are many methods to choose fromQ below is an e!ample of the

-onferroni method and yan;4inot;'abriel;Felsch method.

.ultiple Comparisons

%e7endent Varia:leH $% c,ole&terol

;#<$y7erten&ion&tatu&

;I<$y7erten&ion&tatu&

/ean%ifference

;#-I<'td.rror 'i). 95* Confidence #nterval

  o+er ound 77er ound

+onerroni   normoten&ive :orderline .15 .0 1.000 -1.69 2.00  definite   2.356;< .580 .000 .9 3.4

  :orderline normoten&ive   -.15 .0 1.000 -2.00 1.69  definite   2.198;< .89 .016 .31 4.09

  definite normoten&ive -2.356;< .580 .000 -3.4 -.9  :orderline   -2.198;< .89 .016 -4.09 -.31

!,e mean difference i& &i)nificant at t,e .05 level.

0he -onferroni method is a method that shows all pairwise comparisons/differences alongwith a p;value (sig.) ad=usted for the number of comparisons. n this e!ample, sub=ectswith normal blood pressure and borderline hypertension have similar 8" cholesterollevels, but sub=ects with definite hypertension have different 8" cholesterol levels thanboth sub=ects with normal blood pressure and borderline hypertension.

Homogeneous SubsetsHD; cholesterol

  $y7erten&ion &tatu&

'u:&et for al7,a .05

1 2

@yan36inot3<abriel3?elsch @ange

definite   1310 53.4

:orderline   54 55.6

normoten&ive   1568 55.82

'i).   1.000 .86

/ean& for )rou7& in ,omo)eneou& &u:&et& are di&7layed.

0he yan;4inot;'abriel;Felsch (;4;';F;) method is a method that groups together

groups that are similar in the same subset and groups that are different are in differentsubsets. n this e!ample, sub=ects with normal blood pressure and borderlinehypertension are in one subset and sub=ects with definite hypertension are in a differentsubset. 8ence, sub=ects with definite hypertension have different 8" cholesterol levelsthan sub=ects with normal blood pressure and borderline hypertension, but sub=ects withnormal blood pressure and borderline hypertension have similar 8" cholesterol levels.

63

Page 52: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 52/87

:rus8al,Wallis !est1. Choose *nalyze on "he menu $r.2. Choose 7onparametric !ests

-. Choose : -ndependent Samples)))

6. !est $ariable.s/ Se%e" "he "es" (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen%i on "he rro' %o"e! ne4" "o "he "es" (ri$%e $o4. Repe" "he proess un"i% &ou h(e

se%e"e! %% "he (ri$%es &ou 'n" "o "es".

5. Grouping $ariable Se%e" "he (ri$%e 'hih !efines "he +roupin+ n! "hen %i on "herro' %o"e! ne4" "o "he +roupin+ (ri$%e $o4.

8. Choose "efine Range)))

7. C%i on "he $%n $o4 ne4" "o >inimumA "hen enter the smallest numeric code (%ue for"he +roups.

. C%i on "he $%n $o4 ne4" "o >4imumA "hen enter the largest numeric code value for "he

+roups.

3. Choose Continue 

10. Choose :rus8al,Wallis H s "he Tes" T&pe. No"e "h" "he op"ion m& %re!& $e se%e"e! if"he %i""%e $o4 is no" emp"&.

11. Choose : 

C*+!-7= The +roup (ri$%e mus" $e numeri n! &ou mus" orre"%& en"er "he sm%%es"

numeri o!e (%ue n! "he %r+es" numeri o!e (%ue. SPSS 'i%% %%o' &ou "o se%e" hr"ers"rin+ (ri$%e s "he +roupin+ (ri$%eA s 'e%% s %%o' &ou "o inorre"%& en"er "he

numeri o!e (%ues. The resu%"s !isp%&e! for "he ?rus% W%%is "es" in "hese ses 'i%% $e

inorre"A $u" no error or 'rnin+ mess+e 'i%% $e !isp%&e!.

C>D Example. Fe can use one;way $N%&$ to compare serum insulin levels between

sub=ects with different hypertensive status (2>normotensive, *>borderline, +>definite)

8ypertensive'roup n edian U

Normotensive *IJD *+ G, *I-orderline ICH *+ G, *H"efinite **2 *C **, +2

U, inter5uartile range > +Ith percentile, HIth percentile

50

Page 53: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 53/87

:rus8al Wallis test

Bruskal3?allis !est@anks

  $y7erten&ion &tatu& /ean an(

'erum in&ulin normoten&ive   1568 1526.31

:orderline   54 1685.28

definite   1310 1948.03!otal   3425

!est Statistics=a2b>

  'erum in&ulin

C,i-'quare   130.816

df    2

 &ym7. 'i).   .000

a ru&(al Dalli& !e&t: ?rou7in) Varia:leH $y7erten&ion &tatu&

51

You can select * or more variablesto compare between groups.

0he variable selected as the'rouping &ariable defines thegroups. 084 &$$-4 S8%:"-4 N:46.

n this e!ample the smallest numericcode is 2 (for normal) and the largest

numeric code is + (for definite).

nformation used in the teststatistic < not usually reported.0he descriptives under %ptionsare not usefulQ you can producerelevant descriptives (e.g. medianand inter5uartile range for each

group) using the 4!plore command.

@rus<al ;allis test

$symp. Sig. > p/$alue 0 1.,,+

$symp. is an abbreviation for asymptotic,which means the p;value is computed

using a large sample appro!imation basedon the Normal distribution.

6hi;S5uare > test statistic value > *2.D

"f > degrees of freedom > +

Page 54: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 54/87

ne,Sample <inomial !est1. Choose *nalyze from "he menu $r.

2. Choose 7onparametric !ests

-. Choose <inomial)))

6. !est $ariable 9ist Se%e" "he "es" (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen

%i on "he rro' %o"e! ne4" "o "he "es" (ri$%e $o4. Repe" "he proess un"i% &ou h(ese%e"e! %% "he (ri$%es &ou 'n".

5. !est Proportion C%i on "he $o4 ne4" "o Tes" Propor"ion n! en"ere!i" "he propor"ion (%ue

speifie! $& &our nu%% h&po"hesis.8. Choose : 

Example. n the 0$P study, *+I patients of the I+H patients who were negative forlymphocytoto!ic antibodies at baseline became antibody positive. 0he e!pected rate forbeing antibody positive is 2K. Fe could use the one;sample binomial test to test if therate is different in the 0$P study population.

1Par !ests+inomial !est

  Cate)ory J:&erved

Pro7. !e&t Pro7. &ym7. 'i).

;1-tailed<

7o&itive ?rou7 1   ye& 125 .24 .3 .001;a:<

?rou7 2   no 402 .6!otal   52 1.0

a lternative ,y7ot,e&i& &tate& t,at t,e 7ro7ortion of ca&e& in t,e fir&t )rou7 A .3.: a&ed on 77roimation.

52

Positive is a variable coded* if positive and 2 ifnegative.

ake sure to edit the testproportion value. 0hiscase .2 or 2K. 0hedefault is .I2.

%ne;sample binomial test, two;sided p;value given by + ! .22* > .22+(Note1 SPSS reports the one;sided p;value).

Page 55: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 55/87

c7emars !est

1. Choose *nalyze from "he menu $r.

2. Choose "escriptive Statistics

-. Choose Crosstabs)))

6. Row.s/ Se%e" "he ro' (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen %i on

"he rro' %o"e! ne4" "o "he Ro'/s $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "hero' (ri$%es &ou 'n".

5. Column.s/ Se%e" "he o%umn (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen

%i on "he rro' %o"e! ne4" "o "he Co%umn/s $o4. Repe" "he proess un"i% &ou h(e

se%e"e! %% "he o%umn (ri$%es &ou 'n".8. Choose Cells)))

7. For cell values hoose "o"% un!er peren"+es.

. Choose Continue

3. Choose Statistics)))

10. Choose c7emar

11. Choose Continue

12. Choose : 

There is %so no"her '& "o run >Nemr@s "es" /$u" "he "es" pir (ri$%es mus" $e numeri n!n s&mp"o"i /<s&mp. p=(%ueA $se! %r+e smp%e ppro4im"ion $se! on "he Norm%

!is"ri$u"ionA is repor"e! ins"e! of p=(%ue $se! on e4" me"ho!s.

1. Choose *nalyze from "he menu $r.2. Choose 7onparametric !ests

-. Choose 1 Related Samples)))

6. !est Pair.s/ 9ist Se%e" "'o pire! (ri$%es &ou 'n" from "he soure %is" on "he %ef"Ahi+h%i+h" $o"h (ri$%es $& poin"in+ n! %iin+ "he mouse n! "hen %i on "he rro'

%o"e! in "he mi!!%e of "he 'in!o'. Repe" "he proess un"i% &ou h(e se%e"e! %% "he pire! (ri$%es &ou 'n".

5. Choose c7emar s "he Tes" T&pe.

8. Choose Wilco'on "o "urn off "he op"ion. No"e "h" "he op"ion is "urne! off 'hen "he %i""%e $o4

is emp"&.

7. Choose : 

Example. Suppose we want to compare two different treatments for a rare form ofcancer. Since relatively few cases of this disease are seen, we want the two treatmentgroups to be as comparable as possible. 0o accomplish this goal, we set up a matched studysuch that a random member of each matched pair gets treatment $ (chemotherapy),

whereas the other member gets treatment - (surgery). 0he patients are assigned to pairs(J+* pairs) matched on age (within I years), se!, and clinical condition. 0he patients arefollowed for I years, with survival as the outcome variable.

0he I;year survival rate for treatment $ is *H.*K (*2J/J+*) and for treatment - is *I.K(GI/J+*). Fe could use cNemarMs test to compare the survival rate of the twotreatments.

5-

Page 56: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 56/87

>Nemr@s "es"

 

Crosstabs !reatmentA * !reatment+ Crosstabulation

 

!reatment

!otaldied &urvived

!reatment died Count   510 5 515

* of !otal   82.1* .8* 82.9*

&urvived Count   16 90 106

* of !otal   2.6* 14.5* 1.1*

!otal Count   526 95 621

* of !otal   84.* 15.3* 100.0*

Chi3Square !ests

  Valueact 'i).;2-&ided<

/cemar !e&t   .02;a<

of Valid Ca&e&   621

a inomial di&tri:ution u&ed.

56

t doesnMt matter for cNemarMs testwhich variable is selected for theow(s)1 or 6olumns(s). You can run

more than one test at a time.

:nderStatistics7

select cNemar.

:nder 6ells7, inthis e!ample,select 0otalpercentages.

6cNemarAs test

4!act Sig. (+;sided) > e!act two;sided p/$alue

0 ,.,*

0he p;value is e!act because it is computedusing the -inomial distribution instead of usingan appro!imation to the Normal distribution.

Sur(i(% r"e forTre"men" < is 17.1

Sur(i(% r"e for

Tre"men" : is 15.-

Page 57: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 57/87

Chi,s;uare !est5 (ishers #'act test and !rend test for Con"in+en& T$%es

If "he Chi=sure "es" is reues"e! for 2 4 2 "$%eA SPSS 'i%% %so ompu"e "he Fishers ,4" "es". If "he Chi=sure "es" is reues"e! for "$%e %r+er "hn 2 4 2A SPSS 'i%% %so ompu"e "he>n"e%=;ensEe% "es" for %iner or %iner $& %iner ssoi"ion $e"'een "he ro' n! o%umn

(ri$%es.

1. Choose *nalyze from "he menu $r.2. Choose "escriptive Statistics

-. Choose Crosstabs)))

6. Row.s/ Se%e" "he ro' (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen %i on"he rro' %o"e! ne4" "o "he Ro'/s $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "he

ro' (ri$%es &ou 'n".

5. Column.s/ Se%e" "he o%umn (ri$%e &ou 'n" from "he soure %is" on "he %ef" n! "hen%i on "he rro' %o"e! ne4" "o "he Co%umn/s $o4. Repe" "he proess un"i% &ou h(e

se%e"e! %% "he o%umn (ri$%es &ou 'n".

8. Choose Cells)))

7. Choose "he cell values /e.+.A o$ser(e! n! e4pe"e! oun"sK ro'A o%umnA n! mr+in /"o"%

 peren"+es. No"e "he op"ion is se%e"e! 'hen "he %i""%e $o4 is no" emp"&.

. Choose Continue

3. Choose Statistics)))

10. Choose Chi,s;uare

11. Choose Continue

12. Choose : 

stma Example. $n investigator studied the relationship of parental smoking habits andthe presence of asthma in the oldest child. 0ype $ families are defined as those in whichboth parents smoke and 0ype - families are those in which neither parent smokes. %f *22type $ families, *I eldest children have asthma, and of +22 type - families, J childrenhave asthma. Fe could use a chi;s5uare test or #isherMs e!act test to test if theproportion of first born children with asthma different in these two types of familiesW

55

t doesnMt matter for the chi;s5uare,#isherMs 4!act or trend test which variableis selected for the ow(s)1 or 6olumns(s).You can run more than one test at a time.

Page 58: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 58/87

 

Crosstabsamilytype * asthma Crosstabulation

  a&t,ma !otal  o Ke&

familyty7e Count   85 15 100

  * +it,in familyty7e   85.0* 15.0* 100.0*

  Count   194 6 200

  * +it,in familyty7e   9.0* 3.0* 100.0*

!otal Count   29 21 300

  * +it,in familyty7e   93.0* .0* 100.0*

Chi3Square !ests

  Value df  

 &ym7.

'i). ;2-&ided<

act 'i).;2-&ided<

act 'i).;1-&ided<

Pear&on C,i-'quare   14.4;:< 1 .000

ContinuityCorrection;a<

  12.961 1 .000

i(eli,ood atio   13.45 1 .000

Fi&,er@& act !e&t   .000 .000

of Valid Ca&e& 300a Com7uted only for a 22 ta:le: 0 cell& ;.0*< ,ave e7ected count le&& t,an 5. !,e minimum e7ected count i& .00.

58

:nderStatistics7select 6hi;s5uare.

:nder 6ells7, inthis e!ample,select owpercentages.

*IK of first born in familytype $ have asthma

K of first borin in family type- have asthma

Ci/s8uare test

Pearson 6hi;s5uare (without continuity correction), p/$alue 0 1.,,+ Pearson 6hi;s5uare with continuity correction, p;value > @.22*

$symp. Sig. (+;sided) > two;sided p;value. $symp. is an abbreviation for asymptotic, whichmeans the p;value is computed using a large sample appro!imation based on the Normaldistribution. 6heck that all cells have e!pected cell counts I or greater.

&alue > test statistic valuedf > degrees of freedom

!iserAs Exact test

4!act Sig. (+;sided)> e!act two;side p/

$alue 0 1.,,+

Page 59: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 59/87

Trend Test Example. $ clinical trial of a drug therapy to control pain wasperformed. 0he investigators wanted to investigate whether adverse responses tothe drug increased with larger drug doses. Sub=ects received either a placebo orone of four drug doses. n this e!ample dose is an ordinal variable, and it

reasonable to e!pect that as the dose increases and rate of adverse events willincrease.

"ose n$dverse event

K (n)

  Placebo + *D.DK (J)  I22 mg + +*.GK (H)  *222 mg + +D.*K (G)  +222 mg + *.K (*2)  C222 mg + I2.2K (*J)

0here are several different methods for performing a trend test with ordinal

variables. %ne test, which is available in SPSS is the antel;8aens9el chi;s5uare,also called the antel;8aens9el test for linear association or linear by linearassociation chi;s5uare test.

 dver&e event&

!otalo Ke&

do&e 0 Count   26 6 32

* +it,in do&e   81.3* 18.8* 100.0*

500 Count   25 32

* +it,in do&e   8.1* 21.9* 100.0*

1000 Count   23 9 32* +it,in do&e   1.9* 28.1* 100.0*

2000 Count   22 10 32

* +it,in do&e   68.8* 31.3* 100.0*

4000 Count   16 16 32

* +it,in do&e   50.0* 50.0* 100.0*

!otal Count   112 48 160

* +it,in do&e   0.0* 30.0* 100.0*

Chi3Square !ests

  Value df  

 &ym7. 'i).

;2-&ided<Pear&on C,i-'quare   9.10;a< 4 .058

i(eli,ood atio 8.836 4 .065;inear3by3;inearAssociation

-$-0" $##(

of Valid Ca&e&160

a 0 cell& ;.0*< ,ave e7ected count le&& t,an 5. !,e minimum e7ected count i& 9.60.

57

n this e!ample, there is asignificant trend (p;value >2.22, chi;s5uare trend test),and we would conclude thatthe rate of adverse responsesincreases with drug dose.

Page 60: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 60/87

Bsing #tandardi3ed Residuals in R x C tables. Fhen the contingency table hasmore then + rows and + columns it can be hard to determine the association or thelargest differences. Standard residuals are often helpful in describing theassociation, if the chi;s5uare test indicates there is a statistically significantassociation. 0he (ad=usted) standardi9ed residual re;e!presses the difference

between the observed cell count and e!pected cell count in terms of standarddeviation units below or above the value 2 (the e!pected differences if there is noassociation), and the distribution of the standardi9ed residuals has a standardNormal distribution. 8ence, values less than ;+ or greater than + indicate largedifferences and values less than ; or greater than indicate very largedifferences.

Education $s #tage of Disease at Diagnosis Example.  0he chi;s5uare indicated asignificant association between education level and stage of disease at diagnosis (6hi;s5uare test, p;value > 2.2*J).

  'ta)e of %i&ea&e

 ducation # ## ###

L12 year& Count   20 24 35

  * +it,in education 25.3* 30.4* 44.3*

  Adusted @esidual 3)$" 3$& ($(

  Colle)e Count 3 32 23

  * +it,in education 40.2* 34.8* 25.0*

  Adusted @esidual $- $" 3$'

  Colle)e )raduate Count 40 29 21

  * +it,in education 44.4* 32.2* 23.3*

  Adusted @esidual $- 3$ 3$-

where there are fewer sub=ects with Stage and more sub=ects with Stage or& than e!pected if there was no association between education and stage ofdisease. $lso, to a lesser e!tent, among the sub=ects with a college graduatedegree there a more sub=ects with Stage and fewer sub=ect with Stage or& than e!pected if there was no association between education and stage ofdisease.

5

:nder 6ells7, select $d=ustedstandardi9ed for esiduals

0he ad=usted standardi9edresiduals indicate the biggestdifference between the observedand e!pected cell counts (i.e., themost unusual differences underthe assumption of no associationbetween education and stage ofdisease) are for sub=ects withX*+ years of education,

Page 61: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 61/87

ne sample binomial test5 c7emars test5 (ishers #'act test and Chi,s;uare

test for 1 ' 1 and R ' C Contingency !ables +sing Summary "ata

There is n es& '& in SPSS "o perform one smp%e $inomi% "es"A >Nemrs "es"A

Fishers ,4" "es" or Chi=sure "es" for 2 4 2 or R 4 C "$%e 'hen &ou on%& h(e summr&

!" /i.e.A "he num$er of o$ser("ions in eh e%%.

ne sample binomial test. Suppose &ou o$ser(e 15 ses of m&or!i% infr"ion />I in 5000

men o(er 1 &er perio! n! &ou 'n" "o "es" if "he r"e of >I is eu% "o pre(ious%& repor"e!ini!ene r"e of 5 per 1000 /or 0.005.

1. In ne' /emp"& SPSS D" ,!i"or 'in!o' en"er "he fo%%o'in+ 2  ro's of !"

>I O$ser(e!

 0 635

1 15

The (%ues of 0 n! 1 use! "o in!i"e >I /no&es re r$i"rr&. The (ri$%e nmes re %sor$i"rr& /e.+.A &ou n %e(e "hem s (r0001 n! (r0002.

2. Ne4"A &ou 'n" "o 'ei+h" ses $& O$ser(e!

Choose D"

Choose Wei+h" Cses...Choose Wei+h" ses $&

Choose O$ser(e! n! "hen "he rro' $u""on so "he (ri$%e ppers in "he Freuen& (ri$%e

 $o4.Choose O? 

-. No'A run "he one smp%e $inomi% "es"

Choose <n%&EeChoose Nonprme"ri Tes"s

Choose :inomi%...

Choose >I so "h" in ppers in "he Tes" Vri$%e Bis"Chn+e /e!i" Tes" Propor"ion "o .005.

Choose O? 

53

Page 62: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 62/87

c7emars test. Suppose &ou h(e "he fo%%o'in+ summr& "$%e of presene n! $sene of

D?< $efore n! f"er "herp& for pire! !"A

<f"er "herp&

 No D?< D?<

:efore"herp&

 No D?< 12 7D?< 13 7

1. In ne' /emp"& SPSS D" ,!i"or 'in!o' en"er "he fo%%o'in+ 6  ro's of !"

:efore <f"er O$ser(e!

 1 1 12 1 0 13

 0 1 7

 0 0 7

The (%ues of 0 n! 1 use! "o in!i"e D?< n! no D?< re r$i"rr&. The (ri$%e nmes re

%so r$i"rr& /e.+.A &ou n %e(e "hem s (r0001A (r0002A n! (r000-.

2. Ne4"A &ou 'n" "o 'ei+h" ses $& O$ser(e!

Choose D"

Choose Wei+h" Cses...Choose Wei+h" ses $&

Choose O$ser(e! n! "hen "he rro' $u""on so "he (ri$%e ppers in "he Freuen& (ri$%e

 $o4.Choose O? 

-. No'A run >Nemrs "es"Choose <n%&Ee

Choose Nonprme"ri Tes"s

Choose 2 Re%"e! Smp%es...

Choose :efore n! <f"er so "h" "he& pper in "he Tes" Pir/s Bis".Choose >Nemr s "he Tes" T&pe

Choose Wi%o4on "o "urn off "he op"ion

Choose O? 

80

Page 63: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 63/87

Chi,s;uare test and (ishers #'act test for a 1 ' 1 table . Suppose &ou h(e "he fo%%o'in+

summr& "$%e for or% on"rep"i(e /OC use $& presene or $sene of ner /se or

on"ro%A

OC Use

 No es

Cses /ner 111 8Con"ro%s -7

1. In ne' /emp"& SPSS D" ,!i"or 'in!o' en"er "he fo%%o'in+ 6  ro's of !"

Cse OCuse O$ser(e!

 1 0 111 1 1 8

 0 0 -7

 0 1

The (%ues of 0 n! 1 use! "o in!i"e seon"ro% n! OC use /no&es

re r$i"rr&. The (ri$%e nmes re %so r$i"rr& /e.+.A &ou n%e(e "hem s (r0001A (r0002A n! (r000-.

2. Ne4"A &ou 'n" "o 'ei+h" ses $& O$ser(e!

Choose D"Choose Wei+h" Cses...

Choose Wei+h" ses $&

Choose O$ser(e! n! "hen "he rro' $u""on so "he (ri$%e ppers in "he Freuen& (ri$%e $o4.

Choose O? 

-. No'A run "he Chi=sure /L# Fishers ,4" "es"

Choose <n%&Ee

Choose Cross"$s

Choose Cse n! OCuse s "he ro' "he o%umn (ri$%esChoose S""is"is...

Choose Chi=sure

Choose Con"inueChoose O? 

81

Page 64: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 64/87

The ommn!s re simi%r for runnin+ "he Chi=sure "es" for "$%es %r+er "hn 24 2. Suppose

&ou h(e "he fo%%o'in+ summr& "$%e for e!u"ion %e(e% $& s"+e of !isese " !i+nosis

S"+e of Disese

,!u"ion %e(e% I II III or IV;i+h shoo% or %ess 20 26 -5Co%%e+e -7 -2 2-

Co%%e+e +r!u"e 60 23 21

1. In ne' /emp"& SPSS D" ,!i"or 'in!o' en"er "he fo%%o'in+ 3

  ro's of !"

,!u S"+e O$ser(e!

 1 1 20

 1 2 26 1 - -5

2 1 -7 2 2 -2

 2 - 2-

 - 1 60

 - 2 23 - - 21

The (%ues use! "o in!i"e e!u"ion %e(e% n! s"+e re r$i"rr&A n! "he (ri$%e nmes re%so r$i"rr&.

Fo%%o' s"eps 2. n! -. on "he pre(ious p+e /e4ep" use (ri$%es ,!u n! S"+eA ins"e! ofCse n! OCuse.

82

Page 65: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 65/87

Confidence -nterval for a Proportion

To ons"ru" onfi!ene in"er(% for propor"ion or r"e is r"her ''r! in SPSSA $u" &oun !o i" 'i"h "he r' !" or 'i"h summr& !" /s %on+ s "he smp%e siEe is %r+e enou+h "o

use "he Norm% ppro4im"ion me"ho!s for $inomi% !".

To ons"ru" onfi!ene in"er(% usin+ "he r' !" &ou nee! 1 $inr& in!i"or (ri$%e

eu% "o 1 if "he (ri$%e is presen" for su$9e" n! eu% "o 0 if "he (ri$%e is $sen" for

su$9e"A n! 2 (ri$%e "h" is eu% "o 1 for %% su$9e"s. For e4mp%eA suppose &ou 'n" "oons"ru" onfi!ene in"er(% for "he propor"ion of m%es in &our !" se". Firs" &ou nee!

 $inr& in!i"or (ri$%e for m%esA e.+. &ou ou%! h(e (ri$%e nme! *en!er 'hih is eu%

"o 1 if "he su$9e" is m%e n! eu% "o 0 if "he su$9e" is fem%e. Seon! &ou nee! "o re"e (ri$%e "h" is eu% "o 1 for %% su$9e"s /e.+.A use "he Compu"e s""emen" n! re"e (ri$%e

<%%ones 1. No'A

1. Choose *nalyze on "he menu $r 

2. Choose "escriptive Statistics-. Choose Ratio)))

6. 7umerator Se%e" "he $inr& in!i"or (ri$%e from "he soure %is" on "he %ef" n! "hen%i on "he rro' %o"e! in "he mi!!%e of "he 'in!o' /e.+. se%e" *en!er

5. "enominator Se%e" "he (ri$%e eu% "o 1 for %% su$9e"s from "he soure %is" on "he %ef"

n! "hen %i on "he rro' %o"e! in "he mi!!%e of "he 'in!o' /e.+. se%e" Ones8. Choose Statistics)))

7. Choose ean un!er Cen"r% Ten!en&

. Choose Confidence intervals /!efu%" is 35 onfi!ene in"er(%

3. Choose Continue

10. Choose : 

To i%%us"r"e ho' &ou 'ou%! construct a confidence interval with summary dataA suppose in !" se" of -625 su$9e"sA 1-61 re m%es n! 206 re fem%es

1. In ne' /emp"& SPSS D" ,!i"or 'in!o' en"er "he fo%%o'in+ 2ro's of !"

*en!er O$ser(e! <%%ones0 206 1

  1 1-61 1

2. Ne4"A &ou 'n" "o 'ei+h" ses $& O$ser(e!Choose D"

Choose Wei+h" Cses...

Choose Wei+h" ses $&Choose O$ser(e! n! "hen "he rro' $u""on so "he (ri$%e ppers in "he Freuen& (ri$%e

 $o4.

Choose O? 

8-

Page 66: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 66/87

-. No'A

Choose <n%&Ee on "he menu $r Choose Desrip"i(e S""is"is

Choose R"io...

 Numer"or Se%e" *en!er Denomin"or Se%e" <%%ones

Choose S""is"is...

Choose $o"h >en n! Confi!ene in"er(%s un!er Cen"r% Ten!en&Choose Con"inue

Choose O? 

4!ample of the SPSS output using the previous summary data.

@atio Statistics

@atio Statistics or <ender : Allones

/ean   .392

95* Confidence #ntervalfor /ean

o+er ound   .35

77er ound.408

Price elated %ifferential   1.000

Coefficient of %i&7er&ion   .

Coefficient of Variation /edian Centered   .

!,e confidence interval& are con&tructed :y a&&umin) a ormal di&tri:utionfor t,e ratio&.

86

0he observedproportion was .G+ orG.+K.

$ GIK confidenceinterval is H.IK toC2.DK.

Page 67: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 67/87

Correlation & Regression

Pearson and Spearman Ran8 Correlation Coefficient1. Choose *nalyze on "he menu $r 2. Choose Correlate

-. Choose <ivariate...6. Vri$%e/s Select the variables from "he soure %is" on "he %ef" n! "hen %i on "he rro'

%o"e! in "he mi!!%e of "he 'in!o'.5. Choose Pearson orn! Spearman s "he Corre%"ion Coeffiien"s. No"e "h" "he op"ion is

se%e"e! if "he $o4 hs he mr in i".8. Choose !wo,tailed as the !est of Significance. SPSS 'i%% perform "he "es" "es"in+ if "he

orre%"ion is eu% "o Eero (ersus i" is no" eu% "o Eero.7. Choose : 

7ote "h" &ou n use "he Cross"$s ommn! "o %u%"e confidence intervals for "heorre%"ion.

Example. Pain;related beliefs, catastrophi9ing, and coping have been shown to beassociated with measures of physical and psychosocial functioning among patients withchronic musculoskeletal and rheumatologic pain. 8owever, little is known about the relativeimportance of these process variables in the functioning of patients withtemporomandibular disorders (0").

6orrelation coefficients could be calculated to e!amine the association betweencatastrophi9ing, depression (-eck "epression nventory), pain;related activityinterference and =aw opening (ma!imum assisted opening).

 (eference1 R$ 0urner, S# "workin, ancl, E8 8uggins, 4 0ruelove. 0he roles ofbeliefs, catastrophi9ing, and coping in the functioning of patients with temporomandibular

disorders.O Pain, G+, C*;I*, +22*.

0he correlations are shown on the ne!t page. Note that SPSS will display the correlation betweenvariable * and variable + and between variable + and variable *, which are e5uivalent, and similarlythe correlations between all possible pairs of variables. So, all results displayed below the diagonalof the matri! of results are redundant.

85

0ypically, you would only reporteither the Pearson orSpearman (rank) correlationcoefficients, but you mightcalculate both to see if you getdifferent results orconclusions.

Page 68: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 68/87

Correlations

Correlations

 Cata&tro7,

i=in)

ec(inventory

&core #nterference

/aimuma&&i&tedo7enin)

Cata&tro7, Pear&on Correlation   1 .602;< .451;< -.029

 -i=in) 'i). ;2-tailed<   .000 .000 .58

    118 118 118 116

ec( inventory Pear&on Correlation   .602;< 1 .445;< -.09

 &core 'i). ;2-tailed<   .000 .000 .39

    118 118 118 116

#nterference Pear&on Correlation   .451;< .445;< 1 -.068

  'i). ;2-tailed<   .000 .000 .468

    118 118 118 116

/aimum Pear&on Correlation   -.029 -.09 -.068 1

 a&&i&ted 'i). ;2-tailed<   .58 .39 .468

o7enin)   116 116 116 116

Correlation i& &i)nificant at t,e 0.01 level ;2-tailed<.

1onparametric Correlations

Correlations

 Cata&tro7,i=-

in)

ec(inventory

&core #nterference

/aimuma&&i&tedo7enin)

'7earman@&r,o

Cata&tro7,i=-in)

CorrelationCoefficient

  1.000 .625;< .451;< -.013

  'i). ;2-tailed< . .000 .000 .892

  118 118 118 116

  ec( inventory&core

CorrelationCoefficient

  .625;< 1.000 .455;< -.110

  'i). ;2-tailed< .000 . .000 .241

  118 118 118 116

  #nterference Correlation

Coefficient   .451;< .455;< 1.000 -.046  'i). ;2-tailed< .000 .000 . .621

  118 118 118 116

  /aimuma&&i&tedo7enin)

CorrelationCoefficient -.013 -.110 -.046 1.000

  'i). ;2-tailed< .892 .241 .621 .

  116 116 116 116

Correlation i& &i)nificant at t,e 0.01 level ;2-tailed<.

88

*st entry > Pearson correlation coefficient+nd entry > Sig. (+;tailed) > p;valuerd entry > N > the number observations or sub=ects with non;missing data for both variables

6orrelationbetween6atastrophi9;ing andnterference> .4&

2/$alue 0

1.,,+

N > **D

sub=ects

*st entry > Spearman rank correlation coefficient+nd entry > Sig. (+;tailed) > p;valuerd entry > N > the number observations or sub=ects with non;missing data for both variables

ankcorrelationbetween6atastrophi9;ing andnterference> .4&

2/$alue 01.,,+

N > **Dsub ects

Page 69: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 69/87

Confidence -nterval for a Correlation Coefficient

T&pi%%& "he Cross"$s ommn! is use! "o pro!ue on"in+en& "$%es for "e+ori% (ri$%es.One of "he op"ions un!er S""is"is) is use! "o ompu"e "he orre%"ion oeffiien"A 'hih 'ou%!

&ou mi+h" 'n" "o %u%"e for or!in% (ri$%es. ;o'e(erA &ou n %so use "his op"ion for

un"i""i(e (ri$%es.

Symmetric .easures

  Value &ym7. 'td.

rror;a< 77ro. !;:< 77ro. 'i).

#nterval :y #nterval Pear&on@&   .451 .068 5.445 .000;c<

Jrdinal :y Jrdinal '7earman Correlation .451 .06 5.449 .000;c<

of Valid Ca&e& 118

a ot a&&umin) t,e null ,y7ot,e&i&.: &in) t,e a&ym7totic &tandard error a&&umin) t,e null ,y7ot,e&i&.c a&ed on normal a77roimation.

$n appro!imate GIK confidence interval for the correlation coefficient is given by

6orrelation coefficient *.GJ ! $symp. Std 4rror

n this e!ample, GIK confidence interval for the Pearson correlation coefficient is givenby .CI* *.GJ ! .2JD or .*, .ID

GIK confidence interval for the Spearman rank correlation coefficient is given by .CI* *.GJ ! .2HJ or .2, .J2

87

0he 6rosstabs command is found by selecting$naly9e and then "escriptive Statistics.

n this e!ample the correlation between the5uantitative variables catastrophi9ing andinterference will be calculated.

Select Statistics7 and then select 6orrelations.

SPSS will produce a contingency table of the cross;tabulation of the two variables which you can ignore.

SPSS will display the correlation coefficient and

standard error estimate for the correlationcoefficient, which can be used to calculateconfidence intervals.

Page 70: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 70/87

9inear Regression1. Choose *nalyze on "he menu $r 

2. Choose Regression

-. Choose 9inear)))

6. "ependent= Se%e" "he !epen!en" (ri$%e from "he soure %is" on "he %ef" n! "hen %i on

"he rro' ne4" "o "he !epen!en" (ri$%e $o4.5. -ndependent.s/= Se%e" "he in!epen!en" (ri$%e n! "hen %i on "he rro' ne4" "o "he

in!epen!en" (ri$%e/s $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "he in!epen!en"

(ri$%es &ou 'n".8. Choose S""is"is...

7. Choose ,s"im"es. SPSS 'i%% prin" "he re+ression oeffiien" es"im"eA s"n!r! errorA "

s""is"i n! p=(%ue for eh in!epen!en" (ri$%e /s 'e%% s "he in"erep"ons"n". :&!efu%" "he op"ion shou%! $e se%e"e! /i.e.A "he $o4 hs he mr in i".

. Choose >o!e% fi". SPSS 'i%% prin" "he mu%"ip%e RA R sure!A <!9us"e! R=sure!A s"n!r!

error of "he re+ression %ineA n! "he <NOV< "$%e. :& !efu%" "he op"ion shou%! $e se%e"e!.

3. Choose Con"inue

10. Choose ,n"er s "he >e"ho!. ,n"er is "he !efu%" me"ho! for in!epen!en" (ri$%e en"r&.O"her me"ho!s of (ri$%e en"r& n $e se%e"e! $& %iin+ on "he !o'n rro' n! %iin+

on "he !esire! me"ho! of en"r&.11. Choose :  

<!!i"ion% op"ions re (i%$%e un!er Statistics...A Plots...A Save...A ethodA n! ptions... For e4mp%e

Statistics)))

•  Estimates. Defu%" op"ionA 'hih prin"s "he usu% %iner re+ression resu%"s. 

•  Model fit. Defu%" op"ionA 'hih prin"s "he usu% %iner re+ression resu%"s.

• Confidence intervals /for "he re+ression oeffiien" es"im"es• Covariance matrix  /n! orre%"ion m"ri4 for "he re+ression oeffiien" es"im"es.

•  R squared change. If in!epen!en" (ri$%es re en"ere! in :%os /usin+ "he :%o op"ionK

see $e%o'A "his op"ion ompu"es "he hn+e in "he R sure! $e"'een mo!e%s 'i"h !ifferen" $%os of in!epen!en" (ri$%es. I" is %so usefu% for ompu"in+ pr"i% F "es" for

"e+ori% (ri$%e 'i"h more "hn "'o "e+ories $& en"erin+ "he in!i"or (ri$%es for "he

"e+ori% (ri$%e in "he seon! $%o /:%o 2 of 2 n! %% o"her in!epen!en" (ri$%es in"he firs" $%o /:%o 1 of 2 n! usin+ "he R sure! hn+e op"ion.

•  Part and Partial Correlations. This op"ion ompu"es "he Person orre%"ion oeffiien"

 $e"'een "he !epen!en" (ri$%e n! eh in!epen!en" (ri$%e /ero=or!er orre%"ion n!

"he orre%"ion oeffiien" $e"'een "he !epen!en" (ri$%e n! n in!epen!en" (ri$%es f"eron"ro%%in+ for %% "he o"her in!epen!en" (ri$%es in "he re+ression mo!e% /Pr"i% orre%"ion.

Surin+ "he pr"i% orre%"ion +i(es &ou "he pr"i% R=sure! for n in!epen!en" (ri$%e.

This op"ion %so ompu"es Pr" orre%"ionA 'hih is "he orre%"ion $e"'een "he !epen!en"(ri$%e n! n in!epen!en" f"er /on%& "he in!epen!en" (ri$%e hs $een !9us"e! for %% "he

o"her in!epen!en" (ri$%es in "he re+ression mo!e%. The sure of "he Pr" orre%"ion is

eu% "o "he hn+e in "he R=sure! 'hen n in!epen!en" is !!e! "o "he re+ression mo!e%

'i"h %% "he o"her in!epen!en" (ri$%es.

8

Page 71: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 71/87

• (Multi-)Collinearity diagnostics. This op"ion ompu"es (rious s""is"is for !e"e"in+

o%%ineri"& $e"'een "he in!epen!en" (ri$%es. For e4mp%eA To%erne is "he propor"ion of

(ri$%es (rine no" oun"e! for $& o"her in!epen!en" (ri$%es in "he eu"ion. <(ri$%e 'i"h (er& %o' "o%erne on"ri$u"es %i""%e inform"ion "o mo!e%A n! n use

ompu""ion% pro$%ems. <no"her s""is"i is "he VIF /(rine inf%"ion f"or. Br+e (%ues

re n in!i"or of mu%"io%%ineri"& $e"'een in!epen!en" (ri$%es.

Plots))) 'hih re usefu% for !oin+ re+ression !i+nos"is

• ;is"o+rm or ormal Probability Plot  /P=P p%o" /of the standardi!ed residuals.

• Pro!ue %% "artial (residual) "lots

• O"her s""er p%o"s

Save))) 'hih pro!ue! (ri$%es 'hih re usefu% for !oin+ re+ression !i+nos"is

•  Predicted #alues /uns"n!r!iEe!A s"n!r!iEe!A !9us"e!

•  Residuals /uns"n!r!iEe!A s"n!r!iEe!A s"u!en"iEe!A !e%e"e

•  $istances />h%no$isA CoosA Be(er+e

•  %nfluence &tatistics /!f:e"A !fFi"

 No"e "h" SPSS re"es ne' (ri$%e for eh se%e"e! S(e... op"ion n! !!s "he ne'(ri$%es "o "he !" fi%e. The (ri$%e nmes re !efine! in "he Vri$%e Vie' of "he D" ,!i"or.

One &ou re !one usin+ "hese (ri$%es &ou m& 'n" "o !e%e"e "hem from "he !" fi%e or s(e

"hem /$& re=s(in+ "he !" fi%e.

ethod) C%i on "he !o'n rro' "o "he ri+h" of >e"ho! "o !isp%& "he me"ho!s (i%$%e for

in!epen!en" (ri$%e en"r& /en"erA s"ep'iseA remo(eA $'r!A for'r!. ,n"er is "he !efu%"

op"ion. The o"her op"ions &ou en"er in!epen!en" (ri$%es in"o "he mo!e% usin+ (rious s"ep'ise

me"ho!s.

ptions))) 

• ou n mo!if& "he en"r& n! remo(% ri"eri use! $& s"ep'iseA remo(eA $'r!A n!

for'r! in!epen!en" (ri$%e en"r& me"ho!s.

• ou n !efine ho' o$ser("ions 'i"h missin+ !" re hn!%e!.

Previous5 <loc8 IJ of IJ5 7e't

• ou n use "hese op"ions "o en"er in!epen!en" (ri$%es in $%os in"o "he re+ression mo!e%.

• ou n se%e" !ifferen" me"ho!s of (ri$%e en"r& for eh $%o. This op"ion is %so usefu%

for ompu"in+ pr"i% F "es"s 'i"h "he R sure! hn+e op"ion.

83

Page 72: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 72/87

Example. Simple linear regression of forced e!piratory volume (volume, * second) onheight (cm).

70

0he dependent variable inthis e!ample is forced

e!piratory volumne (fev*).

0here is only *independent variable inthis e!ample, height.

$dditional options can befound under Statistics,Plots, Save, A %ptions.

8ere are the Statistics7 options

:sually you want the default options4stimates and odel fit selected.

n this e!ample, (GIK) confidence intervalfor the regression coefficients is alsoselected.

8ere are the Plots7 options

-y default no options are selected.

n this e!ample, the normal probability plotof the residuals is re5uested.

Page 73: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 73/87

@egression

5ariables 6ntered:@emoved=b>

/odelVaria:le&ntered

Varia:le&emoved /et,od

1   ,ei),t;a< . nter  

a ll reque&ted varia:le& entered.: %e7endent Varia:leH fev1

.odel Summary=b>

/odel 'quare dMu&ted

'quare'td. rror of t,e &timate

1   .562;a< $(&   .314 .5533

a Predictor&H ;Con&tant< ,ei),t: %e7endent Varia:leH fev1

  A145A=b>

/odel'um of 

'quare& df  /ean

'quare F 'i).

1 e)re&&ion   112.380 1 112.380 366.99 .000;a<

  e&idual   244.054 9 .306

!otal   356.434 98

a Predictor&H ;Con&tant< ,ei),t: %e7endent Varia:leH fev1

71

nformation on the independent variablesand dependent variable in the regressionmodel, and the method of entering theindependent variables into the regression

model.

;S5uare > proportion of the totalvariation in the dependent variablee!plained by the independentvariable(s) > .*I or *.IK

is s5uare root of S5uare

$d=usted S5uare < ad=ustsO the

s5uare for the number of variables inthe model

Std. error of the estimate > standarddeviation of the error or residuals.Not usually reported, but used inestimating the standard error of theregression coefficients.

$N%&$ > analysis ofvariance table. Notneeded when there is only* independent variable inthe model. 0he # test ise5uivalent to the t testfor testing if the slope ise5ual to 9ero in theoutput that follows. (# >

t+

)

Page 74: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 74/87

Coeicients=a>

/odeln&tandardi=ed

Coefficient&'tandardi=edCoefficient& t 'i). 95* Confidence #nterval for

  'td.rror eta o+er ound 77er ound

1 ;Con&tant<   -4.330 .335 -12.943 .000 -4.98 -3.63

  height $#( $##)   .562 $&0 $### $#(& $#'(

a %e7endent Varia:leH fev1

Charts

1.00.80.60.40.20.0

4bserved Cum Prob

1.0

0.8

0.6

0.4

0.2

0.0

   6  ,  p  e  c   t  e   d   C  u

  m    P  r  o   b

1ormal P3P Plot o @egression StandardiEed @esidual

Dependent 5ariable9 ev*

72

:nstandardi9ed coefficients - > regression coefficient

n this e!ample - > 2.2G is the slope and - > ;C.2 the intercept

Std. 4rror > standard error of the regression coefficient.

Standardi9ed coefficients -eta > standardi9ed regression coefficient

t > t statistic for testing if the regression coefficient is e5ual to 9ero (versus not e5ual to9ero)

Sig. > p < value for testing if the regression coefficient is e5ual to 9ero (versus not e5ualto 9ero).

GIK confidence interval for - > GIK confidence interval for the regression coefficient

n this e!ample, you would report the slope (.2G), standard error of the slope (.22+)and the p;value (@.22*), or the slope (.2G) and GIK confidence interval (.2I to 2.2C).

Normal probability plot ofthe residuals. 0he points fallalong a straight line,

indicating the residuals have,at least appro!imately, aNormal distribution.

Page 75: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 75/87

inear egression 4!ample with three independent variables

7-

Statistics7 options

-y default, 4stimates and odel fit areselected.

n this e!ample, part and partial correlationsand collinearity diagnostics are also selected.

Plots7 options

Normal probability plot (of thestandardi9ed residuals) and partial(residual) plots are selected.

0he dependent variable is forcede!piratory volume (fev*).

0he independent variables areheight, age and enter.

0he 4nter method means all independent variables will beincluded in the regression model.

Page 76: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 76/87

@egression5ariables 6ntered:@emoved=b>

/odelVaria:le&ntered

Varia:le&emoved /et,od

1   )ender

a)e,ei),t;a<

. nter 

a ll reque&ted varia:le& entered.: %e7endent Varia:leH fev1

.odel Summary=b>

/odel @ SquareAdusted @

Square'td. rror of t,e &timate

1   .601;a< $(" $(&-   .53531

a Predictor&H ;Con&tant< )ender a)e ,ei),t: %e7endent Varia:leH fev1

A145A=b>

/odel'um of 'quare& df  

/ean'quare F 'i).

1 e)re&&ion   128.623 3 42.84 '$") $###=a>

  e&idual   22.811 95 .28

!otal   356.434 98

a Predictor&H ;Con&tant< )ender a)e ,ei),t: %e7endent Varia:leH fev1

Coeicients=a>

 

n&tandardi=ed

Coefficient&

'tandardi=ed

Coefficient& t 'i). Correlation&

Collinearity

'tati&tic&

  'td.rror eta

ero-order Partial Part !olerance V#F

;Con&tant<   -.80 .593 -1.315 .189

height $#)- $##(   .399 9.143 $###   .562 .308 .259 .423 2.364

age 3$#)& $##'   -.200 -6.85 $###   -.206 -.236 -.194 .944 1.059

gender  $)0( $#&   .201 4.591 $###   .48 .161 .130 .420 2.39

a %e7endent Varia:leH fev1

8eight, age, and gender are all statistically significant (P @ .22*), i.e., the regressioncoefficients are different from 9ero.

0he partial correlations (and partial ;s5uares, .2D+

>.2GI, ;.+J+

 >.2IJ, and .*J*+

>.2+J)indicate the correlation with the dependent variable ad=usted for the other variables inthe regression model.

$ low tolerance value (say, @.+2) or a high variance inflation factor (&#) (say, 3 I or *2)may indicate a multicollinearity problem.

76

nformation on the independent variables,method of variable entry, and dependent

variable.

;s5uare is .J* or J.*K(ad=usted ;s5uare is I.DK).$bout JK of the variation in thedependent variables can bee!plained by the independentvariables.

0he overall # test, indicates* or more the independentvariables is significant (P @ .22*). "egrees of freedom ofthe # test are and HGI.

Page 77: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 77/87

1.00.80.60.40.20.0

4bserved Cum Prob

1.0

0.8

0.6

0.4

0.2

0.0

   6  ,  p  e  c   t  e   d   C  u  m    P

  r  o   b

1ormal P 3P Plot o @egression StandardiEed @esidual

Dependent 5ariable9 ev*

30.0020.0010.000.00-10.00-20.00-30.00

height

2.00

0.00

-2.00

     e  v   *

Partial @egression Plot

Dependent 5ariable9 ev*

20.0015.0010.005.000.00-5.00-10.00-15.00

age

2.00

0.00

-2.00

     e  v   *

Partial @egression Plot

Dependent 5ariable9 ev*

Note that SPSS will also produce a partial residual plot for gender. n general, the partialresiduals plots for categorical/nominal variables are not very useful. -o!plots of theresiduals for each category of a categorical/nominal variable are useful for regressiondiagnostics. 0o produce the bo!plots you could use the Save7 options to save theresiduals from a regression and then the -o!plot commands to plot the residuals.

75

Normal probability plot of theresiduals. 0he points fallappro!imately along a straight line,indicating the residuals have(appro!imately) a Normaldistribution.

Partial regression plots forheight and age with lowesssmooths.

0he plot for height is assessingthe relationship between heightand fev* after ad=usting for ageand gender (e.g., is the

relationship linear).

Similarly, the plot for age isassessing the relationshipbetween age and fev* ad=ustingfor height and gender.

Page 78: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 78/87

9inear Regression via *7$* Commands

I" is possi$%e "o use "he n%&sis (rine ommn!s of SPSS "o perform %iner re+ressionn%&sisA $euse "he me"ho!s re m"hem"i%%& eui(%en". Performin+ %iner re+ression

n%&sis (i n%&sis of (rine in SPSS is more omp%i"e! "hn usin+ "he %iner re+ression

ommn!s. ;o'e(erA "he !(n"+e of usin+ "he n%&sis of (rine ommn!s "o perform %iner re+ression is "h" &ou !o no" h(e "o re"e in!i"or (ri$%es for "e+ori% (ri$%es or

re"e in"er"ion "erms. To perform %iner re+ression (i n%&sis of (rine ommn!s

1. Choose *nalyze on "he menu $r 

2. Choose General 9inear odel

-. Choose +nivariate)))

6. "ependent Se%e" "he !epen!en" (ri$%e from "he soure %is" on "he %ef" n! "hen %i on

"he rro' ne4" "o "he !epen!en" (ri$%e $o4.

5. (i'ed (actor.s/ Se%e" "he in!epen!en" (ri$%es "h" re "e+ori%u%i""i(e n! "hen

%i on "he rro' ne4" "o "he fi4e! f"or/s $o4. Repe" "he proess un"i% &ou h(e se%e"e!

%% "he "e+ori% (ri$%es &ou 'n".8. Covariate.s/ Se%e" "he in!epen!en" (ri$%es "h" re on"inuousun"i""i(e n! "hen %i 

on "he rro' ne4" "o "he o(ri"e/s $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "heon"inuous (ri$%es &ou 'n".

7. Choose odel)))

. Choose Custom

3. (actors & Covariates Se%e"hi+h%i+h" %% "he (ri$%esA "hen un!er :ui%! Terms se%e" >in

,ffe"s. ou m& nee! "o %i on "he !o'n rro' "o !isp%& "he >in ,ffe"s op"ion. <f"er

&ou h(e se%e"e! >in ,ffe"sA se%e" "he rro' un!er "he :ui%! Terms. <%% "he (ri$%es

shou%! no' pper in "he >o!e% $o4 on "he ri+h" hn! si!e.10. Choose Continue

11. Choose ptions)))12. Choose Parameter #stimates un!er Disp%&1-. Choose Continue

16. Choose : 

For "e+ori% (ri$%es "he %s" "e+or& /i.e.A "he "e+or& 'i"h "he %r+es" numeri o!in+

(%ue 'i%% $e "he referen" +roup"e+or&. SPSS 'i%% ompu"e "he F "es" for eh on"inuous

in!epen!en" (ri$%e n! for "e+ori% in!epen!en" (ri$%e. :& se%e"in+ "o h(e "he prme"er es"im"es !isp%&e!A SPSS 'i%% %so ompu"e "he re+ression oeffiien" es"im"esA

s"n!r! errorsA " /s""is"i (%uesA p=(%uesA n! 35 onfi!ene in"er(%s "h" &ou +e" from "he

%iner re+ression ommn!s.

To in%u!e interaction terms in "he re+ression mo!e%A in S"ep 3 hi+h%i+h" "'o (ri$%es &ou 'n"

"o re"e n /"'o='& in"er"ion "erm. Un!er :ui%! Terms se%e" In"er"ionA n! "hen se%e" "he

rro' un!er "he :ui%! Terms. < "'o='& in"er"ion $e"'een "'o (ri$%es /(ri$%e 1 H(ri$%e 2 shou%! no' pper in "he >o!e% $o4 on "he ri+h" hn! si!e.

78

Page 79: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 79/87

Example. inear regression of forced e!piratory volume on height (continuous variable)and diabetes status (categorical variablesQ normal, impaired fasting glucose, diabetic).

77

#orced e!piratory volume(fev*) is the dependent

variable.

"iabetes is a categoricalvariables with the categories

8eight is a continuousvariable

:nder odel7, select6ustom, then select each ofthe variables separately untilthey all appear under odel1or select ain 4ffects under-uild 0erms(s), select all#actors A 6ovariates, andthen select the arrow under-uild 0erm(s).

:nder %ptions7, selectParameter estimates to haveusual linear regressionresults displayed in theoutput.

Page 80: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 80/87

nivariate Analysis o 5ariance+eteen3Subects Factors

!ests o +eteen3Subects 6ects

%e7endent Varia:leH fev1

'ource !y7e ### 'umof 'quare& df   /ean'quare F 'i).

Corrected /odel   114.61;a< 3 38.206 125.606 .000

#nterce7t   51.195 1 51.195 168.308 .000

diabetes )$)(0 ) $- ($"00 $#)"

,ei),t   111.38 1 111.38 366.168 .000

rror    241.81 95 .304

!otal   33.9 99

Corrected !otal   356.434 98

a 'quared .322 ;dMu&ted 'quared .319<

Parameter 6stimates

%e7endent Varia:leH fev1

Parameter 'td.rror t 'i). 95* Confidence #nterval

 o+er ound

77er ound

#nterce7t   -4.392 .33 -13.025 .000 -5.054 -3.30

Edia:ete&1.00G   .126 .049 2.549 .011 .029 .223

Edia:ete&2.00G   .046 .056 .830 .40 -.063 .156

Edia:ete&3.00G   0;a< . . . . .

,ei),t   .039 .002 19.136 .000 .035 .043

a !,i& 7arameter i& &et to =ero :ecau&e it i& redundant.

7

0he overall test forthe significant ofdiabetes is displayed(p;value > 2.2+J)

0his table displays the

usual linear regressionresults. n thise!ample diabetes > (diabetic) is thereference group.

Page 81: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 81/87

Example. $dding an interaction between diabetes status and height in the regressionmodel

nivariate Analysis o 5ariance

!ests o +eteen3Subects 6ects

%e7endent Varia:leH fev1

'ource!y7e ### 'umof 'quare& df  

/ean'quare F 'i).

Corrected /odel   114.946;a< 5 22.989 5.492 .000

#nterce7t   42.41 1 42.41 140.354 .000

dia:ete&   .22 2 .136 .44 .639

,ei),t   94.349 1 94.349 309.823 .000

diabetes * height $()- ) $"' $&( $&-(

rror    241.488 93 .305

!otal   33.9 99

Corrected !otal   356.434 98

a 'quared .322 ;dMu&ted 'quared .318<

Parameter 6stimates%e7endent Varia:leH fev1

Parameter 'td. rror t 'i).

 

#nterce7t   -4.33 .63 -6.498 .000

Edia:ete&1.00G   -.168 .818 -.206 .83

Edia:ete&2.00G   .614 .963 .63 .524Edia:ete&3.00G   0;a< . . .

,ei),t   .039 .004 9.506 .000

Edia:ete&1.00G ,ei),t   .002 .005 .361 .19

Edia:ete&2.00G ,ei),t   -.003 .006 -.593 .553

Edia:ete&3.00G ,ei),t   0;a< . . .

a !,i& 7arameter i& &et to =ero :ecau&e it i& redundant.

73

0o add an interactionbetween two variables,select the -uild 0erm(s) toshow nteraction, selecttwo variables under #actorsA 6ovariates and thenselect the arrow under-uild 0erm(s)

0his table displays thesignificant of the diabetesstatus by height interaction

(p;value > 2.ID).

0his table displays theusual linear regressionresults which includes theresults for diabetes status,height and the interaction

between diabetes statusand height.

Page 82: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 82/87

9ogistic Regression

1. Choose *nalyze on "he menu $r 2. Choose Regression

-. Choose <inary 9ogistic)))

6. "ependent Se%e" "he !epen!en" (ri$%e from "he soure %is" on "he %ef" n! "hen %i on

"he rro' ne4" "o "he !epen!en" (ri$%e $o4.5. Covariate.s/ Se%e" "he in!epen!en" (ri$%e n! "hen %i on "he rro' ne4" "o "he

Co(ri"e/s $o4. Repe" "he proess un"i% &ou h(e se%e"e! %% "he in!epen!en" (ri$%es&ou 'n".

8. Choose #nter s "he >e"ho!. ,n"er is "he !efu%" me"ho! for in!epen!en" (ri$%e en"r&.

O"her me"ho!s of (ri$%e en"r& n $e se%e"e! $& %iin+ on "he !o'n rro' n! %iin+

on "he !esire! me"ho! of en"r&.7. Choose : 

<!!i"ion% op"ions re (i%$%e un!er KaLKbA Categorical)))A Save)))A ethodA or ptions))) .For e4mp%e

KaLKb  /for !!in+ "'o='& in"er"ions ou n !! n in"er"ion $e"'een "'o in!epen!en"(ri$%es "o "he re+ression mo!e% $& se%e"in+ "'o (ri$%es from "he soure %is" on "he %ef" /ho%!

!o'n "he C"r% e& 'hi%e se%e"in+ "he "'o (ri$%es n! "hen %iin+ on H$ /f"er &ou

hi+h%i+h" "'o (ri$%es from "he soure %is" on "he %ef" "he H$ shou%! $e (i%$%e "o se%e".

Categorical))) ou n use "he "e+ori% op"ion "o h(e SPSS re"e in!i"or or !umm&

(ri$%es for "e+ori% (ri$%es.

1. Choose C"e+ori%2. C"e+ori% Co(ri"es Se%e" o(ri"e "h" is "e+ori% n! "hen %i on "he rro' ne4"

"o "he Co(ri"es $o4.

-. Choose In!i"or s "he Con"rs" In!i"or is "he !efu%" me"ho! for re"in+ in!i"or(ri$%es. O"her me"ho!s n $e se%e"e! $& %iin+ on "he !o'n rro' n! %iin+ on "he

!esire! me"ho!.

6. Choose "he referene "e+or& s "he %s" "e+or& /i.e.A "he "e+or& 'i"h "he %r+es" numerio!in+ (%ue or "he firs" "he "e+or& /i.e.A "e+or& 'i"h "he sm%%es" numeri o!in+ (%ue.

5. Choose Chn+e.

8. Repe" s"eps 2 "hrou+h 5 un"i% &ou h(e !efine! %% "e+ori% (ri$%es.

7. Choose Con"inue.

Save)))

• Pre!i"e! V%ues /Pro$$i%i"ies n! *roup >em$ership. This op"ions re"es ne' (ri$%es

"h" re "he pre!i"e! pro$$i%i"ies n! "he pre!i"e! +roup mem$ership. The pre!i"e! +roupmem$ership /0 or 1 is $se! on "he 'he"her "he pre!i"e! pro$$i%i"& is %ess "hn /+roup

mem$ership0 or +re"er "hn or eu% "o /+roup mem$ership1 "he %ssifi"ion u"off. :&!efu%" "he %ssifi"ion u"off (%ue is 0.5. ou n hn+e "he u"off (%ue usin+ Op"ions...

• Resi!u%s /Uns"n!r!iEe!A Bo+i"A S"u!en"iEe!A S"n!r!iEe!A De(ine

• Inf%uene /CoosA %e(er+eA !f:e"

0

Page 83: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 83/87

 No"e "h" SPSS re"es ne' (ri$%e for eh se%e"e! S(e... op"ion n! !!s "he ne'

(ri$%es "o "he !" fi%e. The (ri$%e nmes re !efine! in "he Vie'er 'in!o'. One &ou re

!one usin+ "hese (ri$%es &ou m& 'n" "o !e%e"e "hem from "he !" fi%e or s(e "hem /$e re=s(in+ "he !" fi%e.

ethodM C%i on "he !o'n rro' "o "he ri+h" of >e"ho! "o !isp%& "he me"ho!s (i%$%e forin!epen!en" (ri$%e en"r& /en"erA for'r!on!i"ion%A for'r!BRA for'r!W%!A

 $'r!on!i"ion%A $'r!BRA $'r!W%!.

ptions)))

• Confidence interval for odds ratio /CI for e4p/:

• ;osmer=Bemesho' +oo!ness=of=fi"

• ou n mo!if& "he en"r& n! remo(% ri"eri use! $& "he $'r! n! for'r! (ri$%e

en"r& me"ho!s.

Previous5 <loc8 J of J5 7e't ou n use "hese op"ions "o en"er in!epen!en" (ri$%es in $%os

in"o "he re+ression mo!e%. ou n se%e" !ifferen" me"ho!s of (ri$%e en"r& for eh $%o.

Example.  ogistic regression will be used to determine the relationship between any useof health services (coded 2 > no use, * > any use) and age, health inde!, gender and race.Sub=ects in the study (odel 6ities "ata Set) were followed for a varying amount of time,so the number of months followed (e!pos) will also be included as an independent variablein the logistic regression model.

1

0he dependent variable,anyuse, is binary.

0here are I independentvariables. #emale and ace arecategorical/nominal variables.

Page 84: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 84/87

 

;ogistic @egressionCase Processing Summary

n+ei),ted Ca&e&;a< Percent

'elected Ca&e& #ncluded in naly&i& (   3.1

/i&&in) Ca&e&   115 26.9

!otal   434 100.0

n&elected Ca&e&   0 .0

!otal   434 100.0

a #f +ei),t i& in effect &ee cla&&ification ta:le for t,e total num:er of ca&e&.

Dependent 5ariable 6ncoding

Jri)inal Value #nternal Value

.00   0

1.00   1

2

You can use the 6ategorical option todefine which variables are categorical andSPSS will create the indicator variables.

-y default the category with the largest

numerical value (last) will be thereference group. 8ere, the category withthe smallest numerical value was selectedas the reference group.

:nder %ptions you can select to have theGIK confidence intervals for the oddsratios displayed in the output.

$lso, you can run the 8osmer;emeshow

goodness;of;fit test.

nformation on the numberof observations used in thelogistic regression. Sub=ectswith missing data are

e!cluded.

SPSS will always recode the dependent variable to a 2 or *binary variable (internal value), and will estimate the oddsratio for the event coded as * (vs the event coded as 2).f your dependent variable is not coded 2 or *, check thistable to determine the interpretation of the odds ratios.

Page 85: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 85/87

Categorical 5ariables Codings

  Frequency

Parameter codin)

;1< ;2<

race +,ite   49 .000 .000

ot,er    455 1.000 .000

:lac(   224 .000 1.000female male   1450 .000

female   149 1.000

Caution" < ake sure you understand the interpretation of the indicator variables thatSPSS creates. t is very easy to get confused. #or e!ample, in this e!ample the variablerace is coded *>white, +>other, >black. $ common mistake would be to interpret race(*) >white and race(+) > other.

+lock #9 +eginning +lock gnore all the output under -lock 2. 0he outputdisplays information for the logistic regression

  model with no independent variables in the model.

+lock 9 .ethod / 6nter 4mnibus !ests o .odel Coeicients

  C,i-&quare df 'i).

'te7 1 'te7   301.534 6 .000

loc(   301.534 6 .000

/odel   301.534 6 .000

.odel Summary

'te7-2 o)

li(eli,oodCo > 'nell 'quare

a)el(er(e 'quare

1   2609.415;a< .090 .151

a &timation terminated at iteration num:er 5 :ecau&e 7arameter e&timate& c,an)ed :y le&& t,an .001.

  Classiication !able=a>

Predictedanyu&e 7ercent

J:&erved .00 1.00 correct

'te7 1anyu&e

  .00 0 542 .01.00 0 265 100.0

Jverall7ercenta)e

  83.1

a !,e cut value i& .500

-

0his table gives the definition of theindicator variables. 4.g.,  race(*) > other  race(+) > black  (race > white, is the reference group)

female(*) > female(male is the reference group)

:nless you are using stepwisemethods to enter variables orentering variables in different blocks you can ignore this output.

;s5uareO measures for logisticregression < usually not veryuseful.

gnore this table also. t isdescribing how the logisticregression predicts any use if apredicted probability 3 2.I is toused to indicate any use. $llsub=ects are predicted to haveuse.

Page 86: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 86/87

Hosmer and ;emesho !est

'te7 C,i-&quare df 'i).

1   8.368 8 .398

  Contingency !able or Hosmer and ;emesho !est

  anyu&e .00 anyu&e 1.00 !otal

  J:&erved 7ected J:&erved 7ected J:&erved

'te7 1 1   124 123.653 19 19.34 321

  2 101 9.310 218 221.690 319

  3 9 81.589 241 238.411 320

  4 3 6.69 248 253.231 321

  5 5 54.600 263 265.400 320

  6 33 41.820 28 28.180 320

  32 29.24 288 290.26 320

  8 16 21.258 304 298.42 320

  9 13 15.538 30 304.462 320

  10 14 8.40 304 309.260 318

and e!pected values can be used to help identify where there is lack;of;fit when present.

0he last table of the output usually has the results we are most interested in. t lists theodds ratios, p;values and GIK confidence intervals for the odds ratios.

5ariables in the 6quation

  '.. Dald df 'i). 7;< 95.0* C.#.for NP;<

  o+er 77er  

'te71;a<

e7o& .0 .006 16.398 1 .000 1.080 1.068 1.093

  a)e   .009 .003 8.118 1 .004 1.009 1.003 1.016

  female;1<   .501 .099 25.363 1 .000 1.650 1.358 2.005

  race   12.15 2 .002

race;1<   -.424 .190 4.964 1 .026 .655 .451 .950

  race;2<   -.530 .149 12.689 1 .000 .588 .440 .88

  ,ealt,   .048 .010 23.603 1 .000 1.049 1.029 1.00

  Con&tant   -.33 .196 2.958 1 .085 .14

a Varia:le;&< entered on &te7 1H e7o& a)e female race ,ealt,.

4!p(-) > %dds atio

GI.2K 6.. for 4ZP(-) > GIK confidence interval for the odds ratio

Sig. > P;value for the individual odds ratio or the overall significant of acategorical/nominal variable if there is no 4!p(-) listed.

- > the logistic regression coefficient, the log odds ratio

6

8osmer;emeshow goodness;of;fitstatistic is formed by grouping the datainto g groups (usually

g>*2) based on the

percentiles of the estimatedprobabilities and calculatingthe Pearson chi;s5uarestatistic from the + ! gtable of observed andestimated e!pectedfre5uencies. $ small p;valueindicates a lack of fit. argedifferences between theobserved

Page 87: SPSS handout Version 15 5-22-07.doc

7/23/2019 SPSS handout Version 15 5-22-07.doc

http://slidepdf.com/reader/full/spss-handout-version-15-5-22-07doc 87/87

S.4. > the standard error the of the logistic regression coefficient

Fald > the Fald test statistic for testing if ->2 (or e5uivalently odds ratio > *)  or if all -Ms > 2 for a categorical variable with 3+ indicator variables.

d.f. > degrees of freedom of the test statistic.

t is often helpful to write on your output the definition of the indicator variables, so youdonMt get confused about the interpretation of the results. $lso, helpful to change 4!p(-)to odds ratio, and sig. to P;value.

4dds95.0* C.#.for

odd& ratio

  @atio   o+er 77er P-value

'te71;a<

e7o&1.080 1.068 1.093 .000

  a)e   1.009 1.003 1.016 .004

  female ;v& male<   1.650 1.358 2.005 .000

  race   .002

  ot,er v& +,ite   .655 .451 .950 .026

  :lac( v& +,ite   .588 .440 .88 .000

  ,ealt,   1.049 1.029 1.00 .000

5