Guide to SPSS for Windows S13
-
Upload
hazrad1796 -
Category
Documents
-
view
233 -
download
0
Transcript of Guide to SPSS for Windows S13
-
8/13/2019 Guide to SPSS for Windows S13
1/53
GuidetoSPSSDr.JohnRuscio p.1of53
GuidetoSPSSforWindows
Dr.JohnRuscio
TheCollegeofNewJersey
Updated: 1/22/2013
SPSSversion19
Thisguideisdesignedtoassiststudentstakingintroductorylevelcoursesinresearch
methodologyandstatisticsaswellasstudentsengagedinotherresearchexperiencesthatinvolvedata
analysis. Thisisnotcopyrightedmaterialandyoumaysave,print,copy,ordistributeit. Thisguideis
organizedintosevenchaptersandtwoappendices. Thefirsttwochaptersdealwithpreliminary
issues,andtheremainingfivechapterscontaininformationaboutusingSPSStomanageandanalyze
data. ThefirsttwoappendiceshelpwithhandcalculationsforcommonlyusedstatisticsthatSPSSdoes
notprovideandthethirdcontainsguidelinesthathelptodetermineanadequatesamplesizewhen
planningastudy.
1. NotationalConventions
Fonts
SymbolsandStatisticalAbbreviations
2. OverviewOfSampleData
3. DataManagement
SettingUpAnSPSSDataFile
UsingSPSSSyntax: PullDownMenus
andCommandSyntax
CreatingNewVariables
Computing
Recoding
IfStatements
NormalizingData
SelectingCases
4. DescriptiveStatistics
Descriptives
FrequenciesExamine
5. Correlation/RegressionAnalyses
Scatterplots
Correlation
Regression
6. ComparingMeans
OneSampletTest
IndependentGroupstTest
RelatedSamplestTest
IndependentGroupsANOVA
RelatedSamplesANOVA
FactorialANOVA
7. ChiSquareAnalyses
2GoodnessofFitTest
2TestofIndependence
AppendixA: CalculatingCohensd
AppendixB: TablesofqValuesforTukeysHSD
AppendixC: EffectSizeandStatisticalPower
-
8/13/2019 Guide to SPSS for Windows S13
2/53
GuidetoSPSSDr.JohnRuscio p.2of53
1. NOTATIONALCONVENTIONS
1.1Fonts
TermsthatrefertoSPSSvariablenamesorSPSScommandsappearintheCour i er f ont .
SPSSoutputwascopiedandpastedintothisguideandretainstheformattingusedbySPSS.
1.2SymbolsandStatisticalAbbreviations
Statisticstextsvaryintheiruseofsymbolsandstatisticalabbreviations. Thisguidewillfollow
therulesofAPAstyle(seetheAPAPublicationManual,6thed.,2009,forfulldetails). Statistical
abbreviationsareitalicized,butGreeklettersarenot. (NotethattheGreekalphabetisavailablein
WordyoucanfinditbypressingAltISforinsert,symbolandthenscrollingthroughthefont
options). Unlessotherwisenoted,thefollowingsymbolsandabbreviationsrefertosamplestatistics
ratherthanpopulationparameters:
N=samplesize;n=subsamplesize
M=mean;=populationmean
SD=standarddeviation
Mdn=median
IQR=interquartilerange
SE=standarderror
r=correlationcoefficient(Pearsons)
rpb=pointbiserialcorrelation
rS=Spearmansrho
=phicoefficientSEest=standarderroroftheestimate
df=degreesoffreedom
p=pvalue
=alphalevel
b,a=regressioncoefficients(slope,intercept)
=standardizedregressioncoefficient(slope)
t=tvalue
d=Cohensd(effectsize)
F=Fratio
2=etasquared(effectsize)
2
=chisquare=phi(effectsize)
-
8/13/2019 Guide to SPSS for Windows S13
3/53
GuidetoSPSSDr.JohnRuscio p.3of53
2. OVERVIEWOFSAMPLEDATA
Eachprocedureisdescribedandillustratedthroughanalysisofasampledataset,soitmightbe
helpfultounderstandsomethingaboutthesedatawhenexaminingtheoutputinthisguide. These
datacomefromastudyinwhich106studentscompletedsomebackgroundquestionnairesandthen
engagedinajudgmenttask. Thebackgroundquestionnairesincludedthefollowingmeasures:
DemographicdataAseriesofquestionsthatincludedage(inyears),sex(codedas1=male,2=
female),whetherornotvariousmathematicalcourseshadbeentaken(al gforalgebra,geofor
geometry,t r i gfortrigonometry,cal cforcalculus,statcforstatisticscourses,other forother
math/statcourses,andmat hforthetotalnumberofmath/statcourses).
NeedforCognitionScale18itemsthatassesstheextenttowhichindividualsenjoyengagingin
effortful,complexthought. Eachitemisratedona5pointLikertscale,andhalftheitemsarereverse
scored. Variablesinthedatafilearenc1ton18(responsestothe18items),severalreversescored
items(e.g.,nc3r,nc4r,),ncs (NeedforCognitionScalescore,computedasthemeanofthe
availableitemssomeparticipantshadmissingdataonasmallnumberofitems),andncs_group(whetherthescalescorewasabove[2]orbelow[1]themedianforthesample).
Foreachofaseriesof100hypotheticalcases,participantswereprovidedwithasetof
quantitativepredictorsandaskedtomakeapredictionofacriterionvariable. Foreachcase,theywere
alsoaskedtoprovidearangeofvaluessuchthattheywere75%confidentthatthecorrectvaluefell
withintheirrange. Participantsweregiveninstructionsingroupsofupto10butcompletedthetask
individually. Thenatureoftheinformationprovidedforeachcasewasmanipulatedthroughrandom
assignmenttofourexperimentalconditions(codedas1to4inthegroupvariableasfollows):
1. 4S=fourstrongcuesfourquantitativepredictors,eachstronglycorrelatedwiththecriterion
butindependentofoneanother
2. 2S=twostrongcuesanalogousto4Scondition
3. 2S+3W=twostrongplusthreeweakcuessametwopredictorsasin2Scondition,with
additionofthreepredictorsonlyweaklycorrelatedwiththecriterion(andindependentofone
another)
4. 2S+6W=twostrongplussixweakcuesanalogoustothe2S+3Wcondition
Alsomanipulatedviarandomassignmentwassocialaccountability: Onehalfofthe
participantsweretoldinadvancethattheywouldbeaskedtoexplainandjustifytheirjudgment
strategyattheendofthetask,theotherhalfwasnotheldaccountableinthisway. Thisiscodedinthe
account variableas1=accountable,0=notaccountable.
Usingthejudgmentdata,anumberofperformancemeasureswascalculatedforeach
participant:
ConsistencyofjudgmentsThiswascalculatedasthepredictabilityofaparticipantsjudgments
usingastatisticalequation(technically,itwasthevalueofRobtainedforthemodelinwhichthe
availablecuesservedaspredictorsandtheparticipantsjudgmentsservedascriterion). Thisconsi s
variablecouldtakeonvaluesrangingfromthepoorestconsistency(0)toperfectconsistency(1).
-
8/13/2019 Guide to SPSS for Windows S13
4/53
GuidetoSPSSDr.JohnRuscio p.4of53
AccuracyofjudgmentsThiswascalculatedasthecorrelationbetweenaparticipantsjudgments
andthecriterionvalues. Eachaccuracymeasurecouldrangefromchancelevelguessing(0)toperfect
accuracy(1);negativevaluesarealsopossible,andtheserepresentperformanceworsethanchance.
Accuracywasmeasuredacrossthefirst100cases(ach100)aswellaswithinfivesuccessiveblocksof
20casesapiece(ach1=cases120,ach2=cases2140,,ach5=cases81100).
ConfidenceThiswascalculatedintwodistinctways. First,theaveragewidthofeach
participantsconfidenceintervalswascomputed. Higherconfidenceisindicatedbynarrowerintervals,
hencelowervaluesoftheci _wi dt hvariablereflectgreaterlevelsofconfidence. Second,the
proportionofconfidenceintervalsthatcontainedtheactualcriterionvaluewascalculated. Thiswas
measuredacrossthefirst100cases(conf 100)aswellaswithinfivesuccessiveblocksof20casesapiece
(conf 1=cases120,conf 2=cases2140,,conf 5=cases81100). Thislattertypeofconfidence
measureshouldbeinterpretedasfollows: scoresbelow.75indicateoverconfidence(participantswere
askedtoget75%correctbutachievedlessthanthis),scoresof.75indicateappropriateconfidence,and
scoresabove.75indicateunderconfidence.
-
8/13/2019 Guide to SPSS for Windows S13
5/53
GuidetoSPSSDr.JohnRuscio p.5of53
3. DATAMANAGEMENT
3.1SettingUpAnSPSSDataFile
PriortoenteringanydataintoSPSS,itishelpfultoorganizeandpreparethedatafile. SPSS
requiresthatdatabeenteredsuchthateachrowcontainsdataforonehumanoranimalparticipantand
eachcolumncontainsdataforonevariable. Forexample,anindependentvariablemanipulated
betweensubjectswouldbeenteredusingacolumnthatcontainsnumericalcodesindicatingthe
conditiontowhicheachparticipantwasassigned. Anindependentvariablemanipulatedwithin
subjectswouldrequireusingmultiplecolumnstocontainthedatafortheexperimentalconditions(e.g.,
ifparticipantscompletedamemorytaskatthreepointsintime,thiswouldrequirethreecolumnsto
recordperformanceatthesetimes).
EachvariablemustbegivenanSPSSvariablename,anditishelpfultoassignvariablelabels,
valuelabels,andmissingdataindicatorsaswell. Theeasiestwaytoenterallofthisinformationisto
usetheVariableViewportionofthedatafile(clickonthetabtowardthelowerleftcornerofthedata
screentoenablethisview).1. VariablenamesInthe1stcolumn(Name),enterthevariablenames,oneperrow. Variable
namesshouldbeasshortaspossible,becauseyouwilltypetheseoften.
2. VariablelabelsInthe5thcolumn(Label),enteravariablelabelforeachvariable. Thisisyour
opportunitytoassignamorelengthyanddescriptivelabeltoeachvariable,andyouwillnotbe
requiredtotypethesewhenyouanalyzethedata. SPSSwillusethesevariablelabelswhenever
outputisgenerated,soassigningclearlabelswillhelpyoutomakesenseofyourresults.
3. ValuelabelsInthe6thcolumn(Values),clickwithinacellandthenclickonthebutton
thatappearstoopenawindowforenteringvaluelabels. Thisisdonetoassigndescriptive
labelstonumericalcodesusedforcategoricalvariables. Forexample,ifyouenteredsexusing
thecodesof1and2torepresentmalesandfemales,respectively,youcanassignvaluelabelsso
thatintheoutputfileSPSSwilllabelthesegroupsverballyratherthannumerically. Thisisvery
importantbecauseyoumightforgetwhatcodeswereusedatthestageofdataentrylateron
whenyouanalyzethedata. Inthevaluelabelswindow,enteranumericalcodeinthevalue
space,thenaverballabelinthelabelspace,andclickaddtoaddthistothelistofvalue
labels.Whenallofyourlabelsareentered,clickOKtoclosethiswindow.
4. MissingdataindicatorsInthe7thcolumn(Missing),youcanindicatewhatvalue(s),ifany,
indicatemissingdata. Bydefault,SPSSwillassumethatblankcellsinthedatafilearemissing
data,soyoudonotneedtoenteracodetorepresentmissingvalues. However,sometimesthe
reasonwhydataaremissingisitselfcodedandenteredintothedatafile. Forexample,ifyouusedacodeof8toindicatethataparticipantwrotesomethingillegibleandacodeof9to
indicatethataparticipantskippedthequestion,youwouldneedtoalertSPSSthatthesevalues
shouldnotbeincludedinanyanalysestheyarethereforotherpurposes,suchasselectively
includingorexcludingcaseswithmissingdatainanalysesofothervariables. Toindicate
missingvalues,clickwithinacellandthenclickonthebuttonthatappearstoopena
windowforenteringcodesthatrepresentmissingvalues;theuseofthiswindowisself
explanatory.
-
8/13/2019 Guide to SPSS for Windows S13
6/53
GuidetoSPSSDr.JohnRuscio p.6of53
Onceyouhavesetupthedatafile,switchtotheDataView(clickonthistabtowardthe
lowerleftofthedatascreentoenablethisview)andenterthedata.Whenenteringcategoricaldata,be
carefultousethenumericalcodesthatyoudefinedinyourvaluelabels. Also,besuretohandle
missingdataappropriately(e.g.,leaveacellblankorenteranumericalcodedefinedasmissingfora
certainreason). Itisrecommendedthatyousaveyourdatafileregularlytominimizethelossofdataif
theprogram,computer,ornetworkcrasheswhileyouareusingSPSS.
Ifyouaccidentallyenterdataintocolumnsthatdonotcorrespondtovariablesthatyouhave
definedforyourdatafile,highlightthecolumnsbyselectingthemusingthepointeratthelevelofthe
columnheadersandpressdelete. (Thesametechniqueisusefulifyoucreateanewvariablebutlater
decidenottoretainit.) Likewise,ifyouaccidentallyenterdataforrowsthatdonotcorrespondtocases
inthedatafile,youcanhighlighttherowsbyselectingthemattheleveloftherowheadersandpress
delete.
Whenalldataareentered,itisimportantthatyouchecktheaccuracyofyourdataentry. Itmay
betemptingtoproceedimmediatelytotheplanneddataanalyses,butthiscanyielderroneousresultsif
youhavemadeanymistakeswhenenteringthedata. Thereislittlechancethatyouwillnoticethese
mistakesunlessyoulookforthemcarefully. Therearemanywaystocheckfordataentrymistakes,but
noneisaseffectiveaspairingupwithsomeoneelsesuchthatoneofyoureadsoffthedatafromthe
originalsourceandtheotheronechecksthatthismatcheswhatwasenteredintoSPSS. Eventhisisnot
foolproof,butifdoneconscientiouslyyoucanidentifyandcorrectallormostmistakesfairlyeasily.
3.2UsingSPSS: PullDownMenusandCommandSyntax
SPSScontainspulldownmenusthatprovideaccesstomostoftheprogramstools.
Alternatively,youcantypecommandsastext,orsyntax. Thelattermayseemtedious,butthereare
manyadvantagestousingsyntax;themoreoneworkswithdata,themoretheshortcomingsofusing
pulldownmenusbecomeapparent. Inthisguide,pulldownmenusarenotdescribed. Belowisan
overviewofreasonswhyIwouldrecommendthatyoufamiliarizeyourselfwithSPSSsyntaxanduseit
foryourdatamanagementandanalysis:
1. Youcansavearecordofwhatyouhavedone.Whereasyouarelikelytoforgetthepreciseoptions
thatyouselectedfrompulldownmenusandinthewindowsthatappeartorunananalysis,a
syntaxfilewillprovideanexactrecordofyourwork. Thiscanbehelpfullaterwhenwriting
aboutthemethodsandresultsofastudy. Inaddition,ifyouneedtorerunananalysis(e.g.,if
youcollectmoredata,orifyouneedtorespondtoconstructivecriticismbymodifyingyour
analysisplaninsomeway),itsmucheasiertoreopenasavedsyntaxfilethantostartfrom
scratchusingpulldownmenusandwindows.
2. Youcancopyandpastecommands. Beingconfrontedwiththemanychoicesrequiredtoexecutecommandsviapulldownmenusandwindowscanbeabitoverwhelming,whereascopyinga
commandandinsertingyourownvariablesisaneasywaytogetstarted. Also,whenyoure
doingaseriesofsimilaranalyses,copyingandpastingthecommandsiseasierthanworking
throughthepulldownmenusandwindowsrepeatedly,makingminorchangeseachtime.
3. Youcanperformmanydatamanagementtasksmuchmoreeasily. Formanypurposes,itissimpler
andfastertotypecommandsthantousethepulldownmenusandwindows. Forexample,
whenreversescoringitemsand/orcomputingscalescoresfromindividualitems,theequations
-
8/13/2019 Guide to SPSS for Windows S13
7/53
GuidetoSPSSDr.JohnRuscio p.7of53
aremucheasiertotypethantopointandclickintoplaceoneelementatatime. Likewise,
recodingortransformingdatatocreatenewvariablesformanyotherpurposesisconsiderably
easierusingsyntaxthanpulldownmenusandwindows.
ThesearejustafewofthesignificantadvantagestolearninghowtouseSPSSsyntax.How
doesitwork? Hereareafewgeneralrules:
1. Syntax
is
entered
into
a
plain
text
file. YoucancreateanewoneoropenanexistingoneviatheFilemenu. Aswhenworkingwithadatafile,itisrecommendedthatyousaveyoursyntax
fileregularlytoavoidlosingworkintheeventofacomputerproblem. Becausedifferentfile
extensionsareusedforSPSSdata(.sav)andsyntax(.sps)files,youcanassignthesamefile
nametoeachwhentheycorrespondtothesamestudy. Forexample,youcansavethedataas
PsychProject.savandthesyntaxasPsychProject.sps. Youcanalsocopyandpastetext
fromotherplaces,suchasSPSShelpwindows,intoyourownsyntaxfiles.
2. Capitalizationisnotimportant. SPSSwillignorethedistinctionbetweenupper andlowercase
letters. Capitalizeasyoulike,ornotatall.
3. Indentationandspacingarenotimportant. UsersfamiliarwitholderversionsofSPSSwillbeused
toidentifyingthebeginningofanewcommandbyplacingitontheleftmargin,with
subsequentlinesofacommandindented. SPSSnolongerrequiresthis,andyouarefreeto
indent(ornot)anylines,atyourdiscretion. Likewise,youcanleavespaceswithinorbetween
linesasyouseefit.
4. Useanasterisktoplacesnotesinthesyntaxfile. Likeanyotherprogrammingenvironment,SPSS
allowsyoutoaddyourownnotesandcommentsinafilethatwillnotbeexecutedas
commands. Todothis,beginalinewithatleastoneasterisk(*). Anythingthatfollowsan
asteriskwillbeignoredbySPSS.
5. Eachcommandmustbefollowedbyaperiod. SPSSdoesrequirethatyouendeachcommandwitha
period.Notethatacommandmayspanmultiplelines,inwhichcaseasingleperiodshouldappearattheendofthefinalline,notoneachline.
6. Commandsarenotexecutedasyoutypethem. Simplytypingacommandintoasyntaxfilewillnot
causeSPSStotakeanyaction. YouhavetoruncommandsforSPSStoexecutethem. Thereare
manywaystorunoneormorecommands. Perhapsthesimplestistohighlightthemandthen
pressCtrlR(orthegreentrianglenearthetopofthescreen). Therearealsoseveralself
explanatoryoptionsavailablefromtheRunmenuofasyntaxwindow.Whencommands
modifyadatafile(e.g.,whenyoucomputenewvariables),itisuptoyouwhethertosavethe
datafilewiththesechangestheyarenotautomaticallysaved.
Thisguidewillpresentthesyntaxforcommonlyusedcommands,andthereareseveralwaysto
learnmoreaboutSPSScommands. Ifyoufindatoolonapulldownmenuandwouldliketoknow
howtouseitviasyntaxinstead,onceyouhavemadetherequiredselectionsinthewindow(s)toget
theproceduretorunclickonthePastebuttoninsteadoftheOKbutton. Thiswilltranslateyour
selectionsintotheappropriateSPSScommandandplaceitintothesyntaxwindow. Then,youcan
savethesyntaxforfutureuse,modifyit,orcopyandpasteittorunaseriesofsimilaranalyses. In
addition,SPSSprovidesawealthofhelpfulinformationinavarietyofformsthatyoucanexplore
usingtheHelpmenu. Forexample,selectingCommandSyntaxReferencewillopenadetailed
-
8/13/2019 Guide to SPSS for Windows S13
8/53
GuidetoSPSSDr.JohnRuscio p.8of53
PDFfilethatdescribesandillustratesallavailableSPSScommandsinanindexedandcrossreferenced
format.
3.3CreatingNewVariables
Therearemanycircumstancesunderwhichyoumightwanttocreatenewvariables,andSPSS
providesmanywaystodothis. Forexample,thesampledatasetcontainsresponsestothe18itemsontheNeedforCognitionScale,andthesewereusedtocomputeascalescore. Someoftheitemswere
wordednegatively,meaningthattheyhadtobereversescoredbeforecombiningthemwithother
itemstocomputethescalescore. Forsomepurposes,itwashelpfultoassignparticipantstohigh and
lowscoringgroupsonthescale,andacommandisavailabletorecodevaluestoformanewvariable.
Asanotherexample,thetotalnumberofmath/statscourseswascalculatedbyaddingtogethervalues
foraseriesofvariablescorrespondingtoindividualcourses.
Insomesituations,youmightwanttotransformavariabletochangetheshapeofits
distributionsothatitbetterapproximatesnormalityandmeetstheassumptionsofastatisticaltest.
Almostanylogicalormathematicalexpressionthatyoucandevisetotransform,recode,orcomputea
newvariablefromexistingdatacanbeimplementedusingSPSS. Afewofthemostusefulcommands
willbeoutlinedbelow.
3.3.1Computing. Thecomput ecommandallowsyoutocreateanewvariableusingmostany
mathematicalorlogicalexpressionthatyoucanspecify.Manymathfunctionsarebuiltin,including
notonlythestandardarithmeticoperators,butalsoexponentsandroots,logarithms,andmanyothers.
Hereisasamplingofsimplemathematicaltransformationsofoneormoreofthevariablesfromthe
sampledatasetthatwasdescribedearlier(forsimplicity,thenewvariableisnamedyineachcase,but
ofcourseyouwoulduseadifferentnameforeachnewvariableyoucreate):
Command Operation
compute y = al g + geo + t r i g . sumofthethreevariables,whichwouldrepresenthow
manyofthethreehadbeentaken
comput e y = 6 nc3 . thisreversescorestheitem(i.e.,51,42,33,24,
and15)
compute y = al g * t r i g . productofthevariables(whichwouldbe1forthosewho
tookbothcourses,0otherwise)
comput e y = ncs / 5 . ratioofncs scoretothehighestpossiblescore
comput e y = ncs ** 3 . cubeofncs ;the** operatormeansraisetothepowerof
comput e y = ncs ** ( 1/ 3) . cuberootofncs
comput e y = sqr t ( ncs) . squarerootofncs (equivalenttoncs ** ( 1/ 2) )
comput e y = l n(ncs) . natural(basee)logarithmofncs
compute y = exp( ncs) . exponent(basee)ofncs
comput e y = l g10(ncs) . base10logarithmofncs
-
8/13/2019 Guide to SPSS for Windows S13
9/53
GuidetoSPSSDr.JohnRuscio p.9of53
comput e y = 10 ** ncs . exponent(base10)ofncs
Onewidelyusedfunctionprovidesashortcutforaveragingseveralothervariables. Thisis
especiallyhelpfulwhencreatingscalescoresusingindividualitems:
comput e y = mean( nc1, nc2, nc3r , nc4r , nc5r , nc6, nc7r , nc8r , nc9r , nc10,nc11, nc12r , nc13, nc14, nc15, nc16r , nc17r , nc18) .
Bydefault,themeanfunctionwillreturnamissingvalueforanycasethatismissingdataononeor
morevariablesinvolvedinacomputation.However,youcanallowthemeantobecalculatedevenifa
caseismissingdataononeormorevariables. Oneruleofthumbistorequirethatdatabeavailablefor
approximately80%oftheitems(ormore)tocalculatethemean,otherwisethenewvariableisgivena
missingvalue. Forexample,80%ofthe18itemsontheNeedforCognitionScaleisabout14items:
comput e y = mean. 14( nc1, nc2, nc3r , nc4r , nc5r , nc6, nc7r , nc8r , nc9r , nc10,nc11, nc12r , nc13, nc14, nc15, nc16r , nc17r , nc18) .
Byusingmean. 14ratherthanmean,thisrequiresthatsomeonehadrespondedtoatleast14outofthe
18variablestocalculatethescalescore,orelsethepersonsscalescoreislistedasmissing. Iftherewere100itemsonaquestionnaire,youmightcalculatethemeanusingmean. 80torequirethatdatabe
presentfor80%ofthevariables.
Inadditiontomathfunctions,thecomputecommandwillalsohandlelogicalexpressions,
whichareevaluatedastrue=1andfalse=0. Forexample,supposethatyouwantedtocreateanew
variablethatisscoredas1forwomenaged20+and0foreveryoneelseinthedatafile:
comput e y = ( sex = 2) and ( age >= 20) .
Noticethattherearetwologicalexpressionshere,oneforsexandoneforage. Eachisevaluatedas
true=1andfalse=0,thentheresultsarecombinedusingand
toyieldanoverallscoreof1iftheentireexpressionistrueand0iffalse. SPSSwillrecognizethelogicaloperatorsofand,or,andnot .
Finally,notethatyoucancombinelogicalandmathematicaloperatorsandfunctions. For
example,theandinthepreviouscommandlinecouldbereplacedwith* ;multiplyingtwological
expressionsisequivalenttodeterminingwhethertheyarebothtrue. Asalesstrivialexample,suppose
thatyouwanttoscoreaquizthatcontains5multiplechoiceitems,withcorrectanswersofB,C,A,D,
andA,respectively. Ifthedatawereenteredintovariablesnamedx1tox5,withletterresponses
codedusingnumbers,thescoringcommandwouldbe:
comput e qui z = ( x1 = 2) + ( x2 = 3) + ( x3 = 1) + ( x4 = 4) + ( x5 = 1) .
Thiscombinestheevaluationoflogicalexpressions(i.e.,x1 = 2istrueforsomeonewhoansweredthefirstitemcorrectly,falseotherwise)andamathematicalexpression(i.e.,summingtheresultsfromthe
fivelogicalexpressions,eachofwhichyieldsavalueof0or1). Theresultingqui zvariablewould
containthenumberofitemsthateachpersonansweredcorrectly,from0to5.
3.3.2Recoding. Ther ecodecommandishelpfulwhenyouwanttoreassignvaluesfroman
existingvariabletocreateanewversionofthevariable. Forexample,ifyouhaveacategoricalvariable
-
8/13/2019 Guide to SPSS for Windows S13
10/53
GuidetoSPSSDr.JohnRuscio p.10of53
inwhichsomecategorieswereusedinfrequently,youmaywishtocombinethemforanalysis. Or,for
certainpurposesyoumightwanttosplitcaseswhovaryalongacontinuousvariableintocategories.
Ther ecodecommandrequiresthatyouspecifyanexistingvariable,aseriesofconditionsbywhich
valuesarerecoded,andthenthenewvariabletobecreated. Forexample,hereishownc3couldbe
reversescoredtocreateanewvariablenamednc3r :
r ecode nc3 ( 1 = 5) ( 2 = 4) ( 3 = 3) ( 4 = 2) ( 5 = 1) i nto nc3r .
Thisisequivalenttothecommandcomput e nc3r = 6 nc3andillustratestheuseofparentheses
tospecifyeachconditionforrecodingvalues. Hereisanexampleinwhichsomeinfrequentvaluesare
combinedinanewversionofavariable:
r ecode math ( 2, 3 = 1) ( 4 = 2) ( 5, 6, 12 = 3) i nto math3 .
Thistakesavariablethatcontainssomeinfrequentvalues(e.g.,fewstudentstook2,6,or12math
courses)andtransformsitintoanewvariablewiththreegroupsthataresufficientlylargetoperform
statisticalcomparisons: Everyonewhotook2or3mathcourses(n=18),4mathcourses(n=56),and5
ormoremathcourses(n=31).
SPSSwillalsorecognizethenotationofl oandhi torepresentthelowestandhighestvalueson
avariableaswellasthrutoindicatearangeofvalues. Forexample,scoresontheNeedforCognition
Scale(ncs)variedfrom1.611to4.611,andwith50%ofscoresbelow3.6and50%above3.6. Youcould
calculateanewvariablethatindicateswhetherornoteachcasescoredabovetheMdnasfollows:
r ecode ncs ( l o t hr u 3. 59 = 1) ( 3. 60 t hr u hi = 2) i nt o ncs_grp .
Thenewvariablencs_gr pisadichotomizedversionoftheoriginallycontinuousvariablencs .
Finally,SPSSalsorecognizesthenotationofel se,suchthatyoucanincludeacatchall
categoryinther ecodecommandforvaluesnotidentifiedinearlierconditions. Forexample,the
earlierexampleofrecodingthenumberofmathcoursesintothreecategoriescouldbesimplifiedas
follows:
r ecode math ( 2, 3 = 1) ( 4 = 2) ( el se = 3) i nt o math3 .
Thefinalconditionwouldincludeeveryonewhohadtakenanumberofcoursesotherthan2,3,or4
inthiscase,5,6,or12andincludetheminthe3rdcategory.
Afinalnoteonther ecodecommand: Technically,youarenotrequiredtofollowtheseriesof
parentheseswithi nt oandanewvariablename. However,ifyouleavethisoffSPSSwilloverwrite
theoriginalvariablewiththetransformedvalues. Itisrecommendedthatyouneverdothisbecause(a)
youmaywishtousetheoriginaldataforotherpurposesand(b)youmightforgetthattheoriginaldatahasbeenrecoded. Creatinganewvariableissafest,preventingthereentryormisinterpretationof
datathathasbeenrecoded.
3.3.3IfStatements. Anotherwaytocreatenewvariablesistousethei fcommand.Whenever
aspecifiedlogicalexpressionistrue,acalculationisperformed. Forexample,youcancombine
responsesacrossmultiplevariables(e.g.,sexandage)toclassifyindividuals:
-
8/13/2019 Guide to SPSS for Windows S13
11/53
GuidetoSPSSDr.JohnRuscio p.11of53
i f ( sex = 1) and (age < 20) sex_age = 1 .
i f ( sex = 1) and (age >= 20) sex_age = 2 .
i f ( sex = 2) and (age < 20) sex_age = 3 .
i f ( sex = 2) and (age >= 20) sex_age = 4 .
Thisseriesofcommandswouldyieldanewvariable,sex_age,thatvariesacrossfourcategories: 1=
youngermen,2=oldermen,3=youngerwomen,4=olderwomen.
Thecomputationaloptionsfollowingthelogicalexpressionarethesameasthoseforthe
comput ecommand. Inotherwords,youcanspecifyaconditionandthenindicateassimpleor
complexacomputationasyouliketotakeplacewhenconditionisevaluatedastrue. Aswiththe
comput ecommand,thecomputationcaninvolvemathematicaloperatorsorfunctions,logical
expressionsandoperators,oracombinationofthese.
Asafinalnoteonthecreationofnewvariables,theoptionsavailableusingthecomput e,
r ecode,andi f commandsarenotmutuallyexclusive. Often,youcanachievethesameresultsusing
differentcommands,butoneapproachmaybesimplerormoreintuitive. Forexample,supposethat
thevariablecl assiscodedas1=freshman,2=sophomore,3=junior,4=senior. Eachofthefollowingcommands(orblocksofcommands)createsanewvariableuppercl ass torepresent
whetherornotastudentisajunior/senior(codedas1)orafreshman/sophomore(codedas0):
comput e uppercl ass = ( cl ass = 3) or ( cl ass = 4) .
comput e uppercl ass = ( cl ass >= 3) .
r ecode cl ass ( 1 = 0) ( 2 = 0) ( 3 = 1) ( 4 = 1) i nt o uppercl ass .
r ecode cl ass ( 1, 2 = 0) ( 3, 4 = 1) i nt o upper cl ass .
i f ( cl ass = 1) upper cl ass = 0 .i f ( cl ass = 2) upper cl ass = 0 .i f ( cl ass = 3) upper cl ass = 1 .i f ( cl ass = 4) upper cl ass = 2 .
i f ( cl ass = 1) or ( cl ass = 2) upper cl ass = 0 .i f ( cl ass = 3) or ( cl ass = 4) upper cl ass = 1 .
i f ( cl ass = 3) upper cl ass = 1 .
3.4NormalizingData
Sometimes,avariablesdistributiondeviatessubstantiallyfromnormality(e.g.,extreme
positiveornegativeskew),andthiscanbeproblematicwhenastatisticaltestassumesthatthe
populationdistributionisnormal. Ifthereareasmallnumberofoutliersorextremescores,thenthese
mightberemovedpriortoanalysis(seesection3.5forhowtoselectorremovecasesforanalysis). If
valuesspanasmallnumberofscores,suchasresponsestoanitemwitha5pointratingscale,there
maybenowaytotransformthedatatobetterapproximatenormality. Providedthatvaluesspana
largenumberofscores,therearemanytransformationsthatmayhelptobetterapproximatenormality.
Forexample,forapositivelyskewedvariable,onemighttrytakingthesquarerootorlogarithmofthe
-
8/13/2019 Guide to SPSS for Windows S13
12/53
GuidetoSPSSDr.JohnRuscio p.12of53
originalscores. Atransformationthatcanworkextremelywellistoconverttozscoresthrough
percentiles(oftenreferredtoasapercentiletransformation). Essentially,eachoftheoriginalscoresis
convertedtoapercentile,andthenthispercentileisconvertedtothezscoreatthatpercentile. This
ignoressometechnicaldetailsinvolvinghowtohandlethemostextremescores,becausezscoresfor
percentilesof0and100areundefined. Inthetechniquedescribedbelow,themethodthatSPSSlabels
asRankitisused;seetheSPSSmanualforinformationaboutthisandotheroptions.
SPSScannormalizedatausingthepercentiletransformationwithther ankcommand. For
example,thevariablerepresentingjudgmentaccuracyforthefirst100casesexhibitedamodestamount
ofnegativeskewinitsdistribution(seehistogramontheleft,below). Thefollowingcommand
transformsthisintoanewvariablenamedach100n(thenwasaddedtoindicatethatitisa
normalizedversionoftheoriginalvariable):
r ank vars = ach100/ f r acti on = r anki t/ normal i nt o ach100n .
Allthatyouneedtospecifyisthenameofyouroriginalvariable(here,thatwasach100)andthenew
variablethatwillcontainthetransformedvalues(here,thatwasach100n). Thenewvariableapproximatesanormaldistributionveryclosely(seehistogramontheright,below). Inparticular,
thereisnoskewthedistributionnowisperfectlysymmetric.
Acc uracy , 100 cases
0.6000.5000.4000.3000.2000.1000.000
Frequency
25
20
15
10
5
0
Accurac y, 100 cases
Mean =0.379 Std. Dev. =0.087N =106
Normal Score of ach100 using Rankit's Formula
3.00002.00001.00000.0000-1.0000-2.0000-3.0000
Frequency
12.5
10.0
7.5
5.0
2.5
0.0
Normal Score of ach100 using Rankit's Formula
Mean =-6.90E-6 Std. Dev. =0.9987N =106
Onefinalnoteonthepercentiletransformation: Inadditiontonormalizingdata,italso
standardizes. Intheexampleshownabove,notethatfortheoriginalvariable(ach100),M=.38and
SD=.09,whereasforthetransformedvariable(ach100n),M=.00andSD=1.00(notethatSPSSuses
scientificnotationforverysmallorverylargevaluestheMof6.90E6forthenormalizedvariableis
equivalentto.0000069). Normalizingisachievedbytransformingtoadistributionwhoseshape
approximatesnormality,andstandardizingisachievedbytransformingtoadistributionwhoseM=0
andSD=1.Normalizingandstandardizingareseparateanddistinctprocesses,butthepercentile
transformationhappenstoachievebothofthese.
-
8/13/2019 Guide to SPSS for Windows S13
13/53
GuidetoSPSSDr.JohnRuscio p.13of53
3.5SelectingCases
Often,onewishestoworkwithasubsampleofthedata. Forexample,afterexaminingthe
relationshipbetweenvariablesinthefullsample,onemightrepeattheanalysiswithinasubsample
consistingonlyofmen,andtheninasubsampleconsistingonlyofwomen. Youcanidentifya
subsampleofcasesusinganylogicalexpression,howeversimpleorcomplex. Forexample,specifying
sex = 1willyieldanallmalesubsample,andsex = 2anallfemalesubsample. Thesyntaxforselectingasubsampleforanalysisisasfollows:
t emporary .sel ect i f ( logical expression) .analysis .
Thelogicalexpressionisusedtoidentifyyoursubsample(e.g.,sex = 1orsex = 2),andit
canbeassimpleorcomplexasyoulike. Forexample,multipleconditionscanbespecified,andthe
logicaloperatorsand,or,andnot canbeused. Theanalysisiswhatevercommandyouwishto
performusingasubsampleofdata,typicallyastatisticalanalysis. Thet empor arycommandindicates
thatthesampleshouldberestrictedtothespecifiedsubsampleforonlyoneanalysis. Thisisoptional,
buthighlyrecommended,becauseifyoudonotincludethisyoursamplewillberestrictedforall
subsequentanalyses. Forexample,ifyouusesel ect i f ( sex = 1) withoutprecedingitwith
t empor ary,SPSSwillremoveallcasesforwhichsex 1fromyourdatafile. (Ifyouthensavethe
datafile,youwillhavepermanentlydeletedallbutthemen.) Ifyouproceedtousesel ect i f ( sex
= 2) torepeatananalysisamongwomen,youwillgetanerrormessagebecauseyouhavealready
restrictedthesampletomen.Hence,itissafesttoalwaysuset empor arywithsel ect i f .
Asanexample,youcouldexaminethedistributionofNeedforCognitionScalescoreswithin
eachsexusingthefrequenciescommand(describedinthenextchapter)asfollows:
t emporary .
sel ect i f ( sex = 1) .f r eq var s = ncs
/ per 25 50 75/ st at s al l/ hi st nor mal .
t emporary .sel ect i f ( sex = 2) .f r eq var s = ncs
/ per 25 50 75/ st at s al l/ hi st nor mal .
-
8/13/2019 Guide to SPSS for Windows S13
14/53
GuidetoSPSSDr.JohnRuscio p.14of53
4. DESCRIPTIVESTATISTICS
4.1Descriptives
Thedesccommandprovidesaveryconcisetableincludingthevalid(nonmissing)N,
minimumvalue,maximumvalue,M,andSDforoneormorevariables. Forexample,thefollowing
commandwouldprovidedescriptivestatisticsforfourofthevariablesinthesampledatafile;the
outputisshownbelow:
desc var s = age ncs mat h ach100 .
Descriptive Statistics
105 17 31 19.11 1.706
106 1.611 4.611 3.54776 .516049
105 2 12 4.18 1.090
106 .090 .566 .37929 .087445
104
Age (Years)
NCS Score
Total # math courses
Accuracy, 100 cases
Valid N (listwise)
N Minimum Maximum MeanStd.
Deviation
NotethatthevalidNdiffersacrossvariablesbecausetherearemissingdataforsomebutnotallof
them. TheValidN(listwise)indicatesthenumberofcaseswithcompletedataonallvariablesinthe
table. ItisrecommendedthattheshapesofdistributionsbeexaminedtodeterminewhethertheMand
SDareappropriatedescriptivestatisticstosummarizeeachvariable. Forthisreason,anexampleof
howtoreporttheseresultsinAPAstylewillbedelayeduntiltheendofthissection.
Thedescriptivescommandcanbeusedasashortcutforcreatinganewvariableasazscore
transformationofanexistingvariable(aka,forstandardizingavariable). Forexample,usingresultsin
thetableshownaboveonecouldwriteacomputestatementtocalculateanewvariableasthezscore
versionofncs . Alternatively,onecouldusethedescriptivescommand. Thefollowingtwocommands
wouldeachyieldthesamenewvariablezncs :
comput e zncs = ( ncs 3. 54776) / . 516049 .
desc vars = ncs/ save .
4.2Frequencies
Thef reqcommandprovidesnotonlymoredescriptivestatistics,butalso(optionally)ahistogramforeachvariable. Itisrecommendedthatyourequestallstatistics(onthe2ndlineofthe
samplesyntax,below)aswellashistogramswithsuperimposednormalcurves(onthe3rdline)and
quartiles(onthe4thline).Hereisanexample,followedbysampleoutput:
f r eq var s = sex age ncs mat h ach100/ st at s al l/ hi st nor mal/ per = 25 50 75 .
-
8/13/2019 Guide to SPSS for Windows S13
15/53
GuidetoSPSSDr.JohnRuscio p.15of53
Theoutputbeginswithatableofdescriptivestatistics,arrangedwithonecolumnpervariable.
ThisincludesthevalidNandnumberofmissingcases,M,Mdn,mode,SD,minimumandmaximum
values,andassortedotherdescriptivestatistics,includingthe25th,50th,and75thpercentiles. Because
thiscommanddoesnotprovidetheIQR,youcaneasilycalculateitasQ3Q1,whereisthe3rdquartile
(75thpercentile)andQ1isthe1stquartile(25thpercentile). Forexample,forthevariablencs,IQR=
3.944443.15278=.79166. AlsonotethatSPSSwillcalculateeverystatisticforeveryvariable,even
whenitmaynotbemeaningful(e.g.,Mofaqualitativevariable)youneedtodecideforyourselfwhichpiecesoftheoutputtousewheninterpretingorreportingyourresults.
Statistics
106 105 106 105 106
0 1 0 1 0
1.74 19.11 3.54776 4.18 .37929
.043 .166 .050123 .106 .008493
2.00 19.00 3.59967 4.00 .39825
2 18 3.556 4 .457
.443 1.706 .516049 1.090 .087445
.196 2.910 .266 1.188 .008
-1.085 3.326 -.644 3.401 -.994
.235 .236 .235 .236 .235
-.838 21.528 .668 24.835 1.247
.465 .467 .465 .467 .465
1 14 3.000 10 .476
1 17 1.611 2 .090
2 31 4.611 12 .566
184 2007 376.062 439 40.204
1.00 18.00 3.15278 4.00 .33868
2.00 19.00 3.59967 4.00 .39825
2.00 20.00 3.94444 5.00 .43768
Valid
Missing
N
Mean
Std. Error of Mean
Median
Mode
Std. Deviation
Variance
Skewness
Std. Error of Skewness
Kurtosis
Std. Error of Kurtosis
Range
Minimum
Maximum
Sum
25
50
75
Percentiles
Sex (1=M 2=F) Age (Years) NCS Score
Total # math
courses
Accuracy,
100 cases
Next,afrequencytableisprovidedforeachvariable. Thisincludesthefrequencyforeach
valueobservedinthedata,thepercentofcasesatthatscore(whichiscalculatedoutofthetotal
numberofcases),thevalidpercentofcasesatthatscore(calculatedaftermissingdataareexcluded),
andthecumulativepercent(basedonvalidpercents).
Sex (1=M 2=F)
28 26.4 26.4 26.4
78 73.6 73.6 100.0
106 100.0 100.0
male
female
Total
ValidFrequency Percent Valid Percent
CumulativePercent
-
8/13/2019 Guide to SPSS for Windows S13
16/53
GuidetoSPSSDr.JohnRuscio p.16of53
Age (Years)
9 8.5 8.6 8.6
35 33.0 33.3 41.9
24 22.6 22.9 64.8
20 18.9 19.0 83.8
15 14.2 14.3 98.1
1 .9 1.0 99.01 .9 1.0 100.0
105 99.1 100.0
1 .9
106 100.0
17
18
19
20
21
2231
Total
Valid
SystemMissing
Total
Frequency Percent Valid PercentCumulative
Percent
NCS Score
1 .9 .9 .9
1 .9 .9 1.9
1 .9 .9 2.8
1 .9 .9 3.8
1 .9 .9 4.71 .9 .9 5.7
2 1.9 1.9 7.5
4 3.8 3.8 11.3
7 6.6 6.6 17.9
3 2.8 2.8 20.8
1 .9 .9 21.7
3 2.8 2.8 24.5
1 .9 .9 25.5
2 1.9 1.9 27.4
2 1.9 1.9 29.2
6 5.7 5.7 34.9
4 3.8 3.8 38.7
2 1.9 1.9 40.6
1 .9 .9 41.5
8 7.5 7.5 49.1
1 .9 .9 50.0
4 3.8 3.8 53.8
3 2.8 2.8 56.6
4 3.8 3.8 60.4
2 1.9 1.9 62.3
5 4.7 4.7 67.0
1 .9 .9 67.9
4 3.8 3.8 71.7
5 4.7 4.7 76.4
3 2.8 2.8 79.2
6 5.7 5.7 84.9
5 4.7 4.7 89.6
1 .9 .9 90.6
3 2.8 2.8 93.4
3 2.8 2.8 96.2
2 1.9 1.9 98.1
1 .9 .9 99.1
1 .9 .9 100.0
106 100.0 100.0
1.611
2.389
2.444
2.667
2.7062.824
2.833
2.889
2.944
3.000
3.056
3.111
3.167
3.222
3.278
3.333
3.389
3.444
3.500
3.5563.588
3.611
3.667
3.722
3.778
3.833
3.882
3.889
3.944
4.000
4.056
4.111
4.118
4.167
4.222
4.333
4.389
4.611
Total
Valid
Frequency Percent Valid P ercentCumulative
Percent
-
8/13/2019 Guide to SPSS for Windows S13
17/53
GuidetoSPSSDr.JohnRuscio p.17of53
Total # math courses
3 2.8 2.9 2.9
15 14.2 14.3 17.1
56 52.8 53.3 70.5
28 26.4 26.7 97.1
2 1.9 1.9 99.0
1 .9 1.0 100.0105 99.1 100.0
1 .9
106 100.0
2
3
4
5
6
12Total
Valid
SystemMissing
Total
Frequency Percent Valid P ercentCumulative
Percent
Thetableforach100wasomittedbecauseeachparticipanthadauniqueaccuracyscore;hence,
thetablecontained106entries,eachwithafrequencyof1.
Finally,ahistogramisprovidedforeachvariable. Thisincludesasuperimposednormalcurve
generatedusingthemeanandstandarddeviationforthatvariable,whichcanbehelpfulinassessing
theextenttowhichavariablesdistributionisnormal.NotethatSPSSwillprovideahistogram(with
normalcurve)evenforqualitativedata(e.g.,sex),whentheshapeofadistributionmaybe
meaningless.
2.42.11.81.51.20.90.6
Sex (1=M 2=F)
100
80
60
40
20
0
Frequency
Mean =1.74 Std. Dev. =0.443N =106
Sex (1=M 2=F)
-
8/13/2019 Guide to SPSS for Windows S13
18/53
GuidetoSPSSDr.JohnRuscio p.18of53
3027242118
Age (Years)
40
30
20
10
0
Frequency
Mean =19.11 Std. Dev. =1.706N =105
Age (Years )
4.0002.000
NCS Score
25
20
15
10
5
0
Frequency
Mean =3.54776 Std. Dev. =0.516049N =106
NCS Score
-
8/13/2019 Guide to SPSS for Windows S13
19/53
GuidetoSPSSDr.JohnRuscio p.19of53
121086420
Total # math courses
60
50
40
30
20
10
0
Frequency
Mean =4.18 Std. Dev. =1.09N =105
Total # math courses
0.6000.5000.4000.3000.2000.1000.000
Acc uracy, 100 cases
25
20
15
10
5
0
Frequency
Mean =0.37929 Std. Dev. =0.087445N =106
Accu racy, 100 cases
Thefrequenciescommandprovidesadequateoutputtodescribedata,becauseyoucanevaluate
theshapesofdistributionsforquantitativevariablestodeterminethemostappropriatedescriptivestatisticstoreport.
Whenoutliersareidentified,itcanbehelpfultocalculatedescriptivestatisticsaftertheremoval
oftheoutliers. Thefollowingcommandsillustratehowtodothisusingt empor aryandsel ect i f :
-
8/13/2019 Guide to SPSS for Windows S13
20/53
GuidetoSPSSDr.JohnRuscio p.20of53
t emporary .sel ect i f ( age < 31) .f r eq vars = age
/ st at s al l/ hi st nor mal/ per 25 50 75 .
Statistics
Age (Years)
104
0
19.00
.122
19.00
18
1.246
1.553
.307
.237
-.872
.4695
17
22
1976
Valid
Missing
N
Mean
Std. Error of Mean
Median
Mode
Std. Deviation
Variance
Skewness
Std. Error of Skewness
Kurtosis
Std. Error of KurtosisRange
Minimum
Maximum
Sum
Age (Years)
9 8.7 8.7 8.7
35 33.7 33.7 42.3
24 23.1 23.1 65.4
20 19.2 19.2 84.6
15 14.4 14.4 99.01 1.0 1.0 100.0
104 100.0 100.0
17
18
19
20
2122
Total
Valid
Frequency Percent Valid P ercentCumulative
Percent
-
8/13/2019 Guide to SPSS for Windows S13
21/53
GuidetoSPSSDr.JohnRuscio p.21of53
2322212019181716
Age (Years)
40
30
20
10
0
Frequency
Mean =19 Std. Dev. =1.246N =104
Histogram
t emporary .sel ect i f ( mat h < 12) .f r eq vars = mat h
/ st at s al l/ hi st nor mal/ per 25 50 75 .
Statistics
Total # math courses
104
0
4.11
.076
4.00
4
.775
.600
-.314
.237
.482
.469
4
26
427
Valid
Missing
N
Mean
Std. Error of Mean
Median
Mode
Std. Deviation
Variance
Skewness
Std. Error of Skewness
Kurtosis
Std. Error of Kurtosis
Range
Minimum
Maximum
Sum
-
8/13/2019 Guide to SPSS for Windows S13
22/53
GuidetoSPSSDr.JohnRuscio p.22of53
Total # math courses
3 2.9 2.9 2.9
15 14.4 14.4 17.3
56 53.8 53.8 71.2
28 26.9 26.9 98.1
2 1.9 1.9 100.0
104 100.0 100.0
2
3
4
5
6
Total
Valid
Frequency Percent Valid PercentCumulative
Percent
7654321
Total # math courses
60
50
40
30
20
10
0
Frequ
ency
Mean =4.11 Std. Dev. =0.775N =104
Histogram
Forboththeageandmat hvariables,distributionswereapproximatelynormalwhenasingleoutlier
wasremovedfromtheupperendofeachdistribution.Havingremovedtheoutliers,therecalculated
MandSDwouldbeappropriatedescriptivestatistics.
4.3Examine
Theexami necommandalsoprovidesawealthofinformationabouteachvariable,andthereis
someoverlapwiththeoutputofthefrequenciescommand.Notethatthesubcommandrequeststhat
allavailablecasesbeincludedfortheexaminationofeachvariable;ifyouomitthis,thedefaultisto
dropcasesfromtheanalysisiftheyaremissingdataononeormoreofthevariables. Thecommandis:
exami ne age ncs mat h ach100/ mi ssi ng pai r wi se .
-
8/13/2019 Guide to SPSS for Windows S13
23/53
GuidetoSPSSDr.JohnRuscio p.23of53
Case Processing Summary
104 98.1% 2 1.9% 106 100.0%
104 98.1% 2 1.9% 106 100.0%
104 98.1% 2 1.9% 106 100.0%
104 98.1% 2 1.9% 106 100.0%
Age (Years)
NCS Score
Total # math courses
Accuracy, 100 cases
N Percent N Percent N Percent
Valid Missing Total
Cases
Theoutputbeginswithatablethatsummarizestheextentofmissingdata(above). Inwhat
follows,onlytheoutputforncs ispresentedtoillustratethiscommandandsavespace(thefulloutput
forallvariableswouldbeverylengthy).
Case Processing Summary
106 100.0% 0 .0% 106 100.0%NCS ScoreN Percent N Percent N Percent
Valid Missing Total
Cases
Thetableofdescriptivestatisticsincludesthoseprovidedbythefrequenciescommand,plus
somethatwerenot,includingtheIQR(inthetablebelow,notethattheIQR=.792,thesameaswhat
wascalculatedusingthequartilesprovidedbythefrequenciescommand):
Descriptives
3.54776 .050123
3.44837
3.64714
3.56648
3.59967.266
.516049
1.611
4.611
3.000
.792
-.644 .235
.668 .465
Mean
Lower Bound
Upper Bound
95% Confidence
Interval for Mean
5% Trimmed Mean
MedianVariance
Std. Deviation
Minimum
Maximum
Range
Interquartile Range
Skewness
Kurtosis
NCS ScoreStatistic Std. Error
Nextarethegraphicaldisplays: astemandleafplotandaboxplot(akaboxandwhiskersplot).
Theformerisdescribedinmostanystatisticstextandisfairlyselfexplanatory. Inaboxplot,thebox
extendsfromthe1st
to3rd
quartilevaluesinthedata(i.e.,itspanstheIQR),withtheMdnplottedasahorizontallinewithinthebox. Thewhiskersextendfurther,includingthemostextremevalueswithin
1.5IQRofthebox. Anyoutliersorextremescoresareplottedassymbolsevenfurtherout. Inthe
outputshownbelow,boththestemandleafdisplayandtheboxplotsuggestthatalthoughthe
distributionofNCSscalescoresismildlynegativelyskewed,withonecase(#67inthedataset,witha
scoreof1.611)worthcheckingasapossibleoutlieronthelowend,itapproximatesnormalityfairly
well.
-
8/13/2019 Guide to SPSS for Windows S13
24/53
GuidetoSPSSDr.JohnRuscio p.24of53
NCS Scor e Stem- and- Leaf Pl ot
Fr equency St em & Leaf
1. 00 Ext r emes ( =
-
8/13/2019 Guide to SPSS for Windows S13
25/53
GuidetoSPSSDr.JohnRuscio p.25of53
Theexaminecommandcanbeusedtocomparesubsamplesidentifiedbyacategoricalvariable.
Forexample,thefollowingcommandwouldprovidedescriptivestatisticsandgraphsforncs inthe
fullsampleandthenwithinsubsamplesofmenandwomen:
exami ne ncs by sex/ mi ssi ng pai r wi se .
-
8/13/2019 Guide to SPSS for Windows S13
26/53
GuidetoSPSSDr.JohnRuscio p.26of53
5. CORRELATION/REGRESSIONANALYSES
5.1Scatterplots
Priortocalculatingcorrelationcoefficientsorregressionequations,itisimportanttoexamine
therelationshipsbetweenvariables. Ascatterplotdisplaystherelationshipbetweentwovariablesby
plottingadatapointforeachcaseinthesample. Thelocationofeachpointindicatesitsscoresonthetwovariables.Hereisanexampleofascatterplotbetweenconsistency(consi s)andaccuracy
(ach100)ofparticipantsjudgments:
graph/ scat t er pl ot ( bi var ) = consi s wi t h ach100 .
1.0000.8000.600
Consistency (R)
0.600
0.500
0.400
0.300
0.200
0.100
0.000
Accuracy,
100cases
Notethatthefirstvariablethatyouspecify(here,consi s)isplacedonthexaxisandthesecond
variable(here,ach100)isplacedontheyaxis.
Whenyouhaveaseriesofvariablesandwouldliketoexaminescatterplotsbetweenallpairsof
them,youcangenerateascatterplotmatrix. Forexample,thefollowingcommandprovidesa
scatterplotmatrixusingtheaccuracyscoresforthefirstthreeblocksoftrialsinthestudy(ach1,ach2,andach3):
graph/ scat t er pl ot ( mat r i x) = ach1 ach2 ach3 .
-
8/13/2019 Guide to SPSS for Windows S13
27/53
GuidetoSPSSDr.JohnRuscio p.27of53
Accuracy, cases 41-60Accuracy, cases 21-40Accuracy, cases 1-20
Accuracy,cases41-60
Accuracy,cases
21-40
Accuracy,cases1-20
Asyoucansee,thismatrixincludesallpairwisecombinationsofvariables. Infact,eachcombinationof
variablesisusedtocreatetwoscatterplotsbyswappingthetwovariablespositionsonthexandy
axes. Forexample,thescatterplotsintheupperrightandlowerleftcellsinvolvethesametwo
variables,buttheirpositionsontheaxesarereversed.
5.2Correlation
Thecorr commandwillcalculatethecorrelationbetweentwovariables,oramatrixofcorrelationsbetweenallpairsofspecifiedvariables.Whenbothvariablesarecontinuous,thisyields
theconventionalPearsonproductmomentcorrelationcoefficient(r).Whenthedataareranked,this
yieldsSpearmansrho(rs).Whenonevariableiscontinuousandtheotherisdichotomous,thisyieldsa
pointbiserialcorrelation(rpb).Whenbothvariablesaredichotomous,thisyieldsaphicoefficient().
Thus,thiscommandisversatileinthatitcanhandlemanytypesofdatabesuretousetheproper
notationwhenreportingtheresults.
Toillustratethebasiccommand,hereishowtocalculateacorrelationbetweentheconsistency
(consi s)andaccuracy(ach100)ofparticipantsjudgments:
corr var s = consi s ach100 .
-
8/13/2019 Guide to SPSS for Windows S13
28/53
GuidetoSPSSDr.JohnRuscio p.28of53
Correlations
1 .518
.000
106 106
.518 1
.000
106 106
Pearson Correlation
Sig. (2-tailed)
N
Pearson CorrelationSig. (2-tailed)
N
Consistency (R)
Accuracy, 100 cases
Consistency(R)
Accuracy,100 cases
Evenwhenjusttwovariablesareprovided,SPSSpresentstheresultsinamatrix. Onthediagonal
runningfromtheupperlefttothelowerrightcells,eachcorrelation=1becauseeachofthesecells
crossesavariablewithitself;youshouldignorethese. Youcanalsoignorethevaluesabovethis
diagonalorthevaluesbelowthisdiagonal,becausethesesetsofresultsareidentical(thisiseasyto
verifyinthesimplestcase,shownabove,wherethereareonlytwovariablesandhenceonlyone
correlationalresult.Withinacell,thecorrelationappearsabovethepvalue,followedbythenumberof
casesintheanalysis.TowritetheresultsinAPAformat,rememberthatdf=N2forcorrelations. Theresultsshown
abovecouldbereportedasfollows: Theconsistencyandaccuracyofparticipantsjudgmentswere
statisticallysignificantlycorrelated,r(104)=.52,p
-
8/13/2019 Guide to SPSS for Windows S13
29/53
GuidetoSPSSDr.JohnRuscio p.29of53
Noticethatmostofthesecorrelationswerecalculatedusing106cases,butsomewerecalculated
using105casesspecifically,therewasonepieceofmissingdataforach5becauseoneparticipantdid
notcompletethejudgmenttask. Bydefault,SPSSusesapairwisemissingdatatechniqueinwhich
eachcorrelationinamatrixiscalculatedusingasmuchdataaspossible.However,itissometimes
preferabletousealistwisemissingdatatechniqueinwhichanycasethatismissingdataononeor
morevariablesiseliminatedfromallcorrelations. Torerunthesecorrelationsusingthelistwise
missingdatatechnique,itcanbeaddedasanoptionalsubcommandtothecorrelationcommand:
cor r vars = consi s ach1 ach2 ach3 ach4 ach5/ mi ssi ng l i stwi se .
Correlations a
1 .399 .383 .247 .373 .126
.000 .000 .011 .000 .199
.399 1 .475 .396 .167 .103
.000 .000 .000 .089 .295
.383 .475 1 .431 .314 .120
.000 .000 .000 .001 .221
.247 .396 .431 1 .197 .190
.011 .000 .000 .044 .052
.373 .167 .314 .197 1 .003
.000 .089 .001 .044 .975
.126 .103 .120 .190 .003 1
.199 .295 .221 .052 .975
Pearson Correlation
Sig. (2-tailed)
Pearson Correlation
Sig. (2-tailed)
Pearson Correlation
Sig. (2-tailed)Pearson Correlation
Sig. (2-tailed)
Pearson Correlation
Sig. (2-tailed)
Pearson Correlation
Sig. (2-tailed)
Consistency (R)
Accuracy, cases 1-20
Accuracy, cases 21-40
Accuracy, cases 41-60
Accuracy, cases 61-80
Accuracy, cases 81-100
Consistency(R)
Accuracy,cases 1-20
Accuracy,cases 21-40
Accuracy,cases 41-60
Accuracy,cases 61-80
Accuracy,cases 81-100
Listwise N=105a.
Inthismatrix,Nisnotpresentedineachcellbecauseitisidenticalforallofthem,asnotedin
thefootnotebeneaththetable.
Anotheroptioncansimplifyacorrelationmatrixwhenyouareonlyinterestedincertain
pairingsofvariables. Forexample,supposethatyouwouldliketoknowhowstronglyconsistency
correlateswitheachofthefiveaccuracyscores,butyouarenotinterestedinhowstronglytheaccuracy
scorescorrelatewithoneanother. Thematrixabovecontainsall15correlationsbetweenpairsof
variables,butyouonlywantedthe5correlationsbetweenconsistencyandtheaccuracyscores. To
obtainonlythecorrelationsyouwant,youcanspecifyoneormorevariablestoformtherow(s)ofa
matrix,followedbythetermwi t handthenoneormorevariablestoformthecolumn(s)ofamatrix,as
follows:
cor r vars = consi s wi t h ach1 ach2 ach3 ach4 ach5/ mi ssi ng l i stwi se .
Correlations a
.399 .383 .247 .373 .126
.000 .000 .011 .000 .199
Pearson Correlation
Sig. (2-tailed)
Consistency (R)
Accuracy,cases 1-20
Accuracy,cases 21-40
Accuracy,cases 41-60
Accuracy,cases 61-80
Accuracy,cases 81-100
Listwise N=105a.
-
8/13/2019 Guide to SPSS for Windows S13
30/53
GuidetoSPSSDr.JohnRuscio p.30of53
5.3Regression
Ther egr essi oncommandcalculatesalinearregressionequation. Thereisaremarkable
varietyofoptionsavailableinSPSSregressionanalyses,andforthesakeofsimplicityonlysimple
linearregressionwillbedescribedherethesimplereferstotheinclusionofasinglepredictor
variable. Toperformaregressionanalysis,youneedtospecifythedependentvariableandthe
predictorvariable. Forexample,thefollowingcommandcalculatesaregressionequationusingconsistencyofjudgments(consi s)topredictaccuracyofjudgments(ach100,whichserveshereas
thedependentvariable):
r egr essi on/ dep ach100/ ent er consi s .
Thisgeneratesaconsiderableamountofoutput. First,therewillbeatablelabeledVariables
Entered/Removedthatnotesthevariableenteredasapredictorandtheoneservingasthedependent
variable:
Variables Entered/Removed b
Consistency (R)
a . Enter
Model1
VariablesEntered
VariablesRemoved Method
All requested variables entered.a.
Dependent Variable: Accuracy, 100 casesb.
Next,atablelabeledModelSummarywilldisplaythecorrelationbetweenthepredictorand
dependentvariable(listedasR,butbecausethisissimplelinearregressionitisequivalenttoPearsons
r;notethatthisvalueisidenticaltowhatwasobtainedaboveinthefirstcorrelationalanalysis). This
tablealsoincludesthecoefficientofdetermination(r2,listedhereasRSquare),anadjustedvalueofthisstatisticthatestimateswhatr2wouldlikelybeinanewsample(AdjustedRSquare),andthe
standarderroroftheestimate(SEest,listedasStd.ErroroftheEstimate),whichrepresentsthetypical
amountoferrorinpredictingthedependentvariableusingtheregressionequationbasedonthe
predictorvariable:
Model Summary
.518a .269 .262 .075143
Model1
R R SquareAdjustedR Square
Std. Error ofthe Estimate
Predictors: (Constant), Consistency (R)a.
Thenexttable,labeledANOVA,canbeignored;itsresultsareredundantwiththoseinthe
tablethatfollows.
-
8/13/2019 Guide to SPSS for Windows S13
31/53
GuidetoSPSSDr.JohnRuscio p.31of53
ANOVAb
.216 1 .216 38.195 .000a
.587 104 .006
.803 105
Regression
Residual
Total
Model
1
Sum ofSquares df Mean Square F Sig.
Predictors: (Constant), Consistency (R)a.
Dependent Variable: Accuracy, 100 casesb.
Thefinaltable,labeledCoefficients,containstheresultsthattypicallyaremostusefulina
regressionanalysis:
Coefficients a
-.231 .099 -2.332 .022
.689 .111 .518 6.180 .000
(Constant)
Consistency (R)
Model
1
B Std. Error
UnstandardizedCoefficients
Beta
StandardizedCoefficients
t Sig.
Dependent Variable: Accuracy, 100 casesa.
Theregressioncoefficients(b=slope,a=intercept)usedtoconstructthebestfittingregressionequation
areshowninthecolumnlabeledBunderUnstandardizedCoefficients. Inthiscase,b=.689anda
=.231,sotheregressionequationcouldbewrittenasfollows:
PredictedAccuracy=.689Consistency.231
Alternatively,ifthepredictoranddependentvariablesweretransformedintozscores,theintercept
couldbedroppedfromtheequation,andthecoefficientforthepredictor(slope)wouldequalthe
correlation:
z(PredictedAccuracy)=.518z(Consistency)
Whenstandardized,theslopeisknownas,anditisalsolistedinthetableshownabove. Finally,the
pvalueforthiscoefficientisshowninthetableundertheSig.heading.Whenwritingupregression
resultsinAPAstyle,thevalueofandparesufficient: =.52,p
-
8/13/2019 Guide to SPSS for Windows S13
32/53
GuidetoSPSSDr.JohnRuscio p.32of53
6. COMPARINGMEANS
6.1OneSampletTest
Thiscommandallowsyoutotestwhetherthemeanobservedinyoursample,usedasan
estimateofapopulationmean,differsfromaspecifiedpopulationmean. Thecommand,t - tes t,is
followedbyasubcommandonwhichyouspecifythepopulationmean()thatrepresentsthenull
hypothesis(thisisthet est val onthe2ndline,below)andthenanothersubcommandonwhichyou
listoneormoredependentvariablestotest(ach100,intheexampleshownbelow). Ifyoudonot
specify,SPSSusesadefaultt est val of0. Ifyoulistmultipledependentvariables,aseparateone
samplettestisperformedforeach(asshowninthesecondcommandandsetofoutputprovided
below).
t - t e s t/ t est val = 0/ var s = ach100 .
TheoutputbeginswithatablelabeledOneSampleStatisticsthatprovidesbasicdescriptive
statisticsforthedependentvariable(s),includingthevalidN,M,SD,andSEoftheM:
One-Sample Statistics
106 .37929 .087445 .008493Accuracy, 100 cases
N MeanStd.
DeviationStd. Error
Mean
NextisatablelabeledOneSampleTestthatcontainstheactualttestresults,includingthet
value,df(whichisN1forthistypeofttest),pvalue(listedunderSig.(2tailed));thevalueofis
alsolistedastheTestValue(inthiscase,itis0):
One-Sample Test
44.657 105 .000 .379288 .36245 .39613Accuracy, 100 casest df Sig. (2-tailed)
MeanDifference Lower Upper
95% ConfidenceInterval of the
Difference
Test Value = 0
SPSSdoesnotcalculateameasureofeffectsize,butitiseasytocomputeCohensdbyhand(see
AppendixAforformulasandAppendixCforadditionalinformation). InAPAstyle,onemightreport
theseresultsasfollows: Theaccuracyofparticipantsjudgments,assessedasthecorrelationbetweeneachparticipantsjudgmentsandthecriterionvalues(M=.38,SD=.09),wasstatisticallysignificantly
betterthanchance(=.00),t(105)=44.66,p
-
8/13/2019 Guide to SPSS for Windows S13
33/53
GuidetoSPSSDr.JohnRuscio p.33of53
t - t e s t/ t est val = 0/ vars = ach1 ach2 ach3 .
One-Sample Statistics
106 .43105 .158472 .015392
106 .61701 .124916 .012133
106 .39030 .106211 .010316
Accuracy, cases 1-20
Accuracy, cases 21-40
Accuracy, cases 41-60
N Mean
Std.
Deviation
Std. Error
Mean
One-Sample Test
28.005 105 .000 .431050 .40053 .46157
50.854 105 .000 .617007 .59295 .64106
37.834 105 .000 .390300 .36984 .41076
Accuracy, cases 1-20
Accuracy, cases 21-40
Accuracy, cases 41-60
t df Sig. (2-tailed)Mean
Difference Lower Upper
95% ConfidenceInterval of the
Difference
Test Value = 0
Becauseeachofthesetestsyieldedstatisticallysignificantresults,onecouldreporttheresults
moreconciselyinasinglesentenceratherthanusingthreerepetitivesentencesformattedliketheone
forthepreviousanalysis. Forexample: Foreachofthefirstthreeblocksof20trials,theaccuracyof
participantsjudgments(Ms=.43,.62,.39andSDs=.16,.12,.11,respectively)exceededchance(=.00),
eacht(105) 28.01,eachp2.72.
6.2IndependentGroupstTest
Thiscommandteststhenullhypothesisthatthemeansofthepopulationsfromwhichtwogroupsweredrawnareequal. Toperformtheindependentgroupsttest,thecommand,t - tes t,is
followedbythespecificationofthetwogroupstobecomparedandthenasubcommandonwhichyou
listoneormoredependentvariablestotest. Ifyoulistmultipledependentvariables,aseparate
independentgroupsttestisperformedforeach(asshowninthesecondcommandandsetofoutput
providedbelow). Inthefollowingexample,groupsaredefinedbythesexvariable,withthe
specificationthatthegroupsareidentifiedbythecodesof1and2(whichcorrespondtomenand
women);accuracy(ach100)islistedastheonlydependentvariable.
t - t est gr oups = sex( 1, 2)/ var s = ach100 .
TheoutputbeginswithatablelabeledGroupStatisticsthatprovidesbasicdescriptive
statisticsforthedependentvariable(s)includingthevalidN,M,SD,andSEoftheMforthetwo
groupsbeingcompared:
-
8/13/2019 Guide to SPSS for Windows S13
34/53
GuidetoSPSSDr.JohnRuscio p.34of53
Group Statistics
28 .35359 .088279 .016683
78 .38851 .085837 .009719
Sex (1=M 2=F)
male
female
Accuracy, 100 cases
N MeanStd.
DeviationStd. Error
Mean
ThisisfollowedbyatablelabeledIndependentSamplesTestthatcontainstheactualttest
results. Notethatthetvalue,df(whichisN2forthistypeofttest),andpvalue(listedunderSig.(2
tailed))areprovidedtwice. Thetoprowassumesthatvariancesinthetwopopulationsareequal(i.e.,
thehomogeneityofvarianceassumptionissatisfied),andthebottomrowdoesnotassumethis.
Levenestestforequalityofvariancesisonewaytodeterminewhethertheassumptionissatisfied,and
thereforewhichrowofthetabletousewheninterpretingandreportingthetestresults. Specifically,
Levenestestevaluatesanullhypothesisofequalvariances. IfthepvalueforLevenestestissmall
(e.g.,below=.05),thishypothesiswouldberejectedandonewouldnotassumeequalvariances;the
bottomrowwouldprovidetheappropriateresults. IfthepvalueforLevenestestislarge(e.g.,above
=.05),onewouldfailtorejectthehypothesisofequalvariancesandthereforeusethetoprowofthe
table.
Independent Samples Test
.011 .917 -1.833 104 .070 -.034928 .019052 -.072708 .002852
-1.809 46.556 .077 -.034928 .019308 -.073780 .003924
Equal variancesassumed
Equal variancesnot assumed
Accuracy, 100 cases
F Sig.
Levene's Test forEquality of Variances
t df Sig. (2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
Inthiscase,thepvalueforLevenestestiswellabove=.05,soonecansafelyassumeequal
variancesandusethetoprowoftheoutput. SPSSdoesnotcalculateameasureofeffectsize;seeAppendixAfordetailsonhowtocalculateCohensd. TheseresultscouldbereportedinAPAstyleas
follows: Therewasnostatisticallysignificantdifferenceintheaccuracyofjudgmentsmadebymen
(M=.35,SD=.09)andwomen(M=.39,SD=.09),t(104)=1.83,p=.070,d=0.40.
Whentheassumptionofequalvariancesisnotsatisfiedandtheresultsaredrawnfromthe
bottomrowofthetable,thisshouldbenotedforreaders. Inotherwords,readerspresumethatthe
homogeneityofvarianceassumptionwassatisfiedunlesstoldotherwise. Hereishowthewriteup
woulddifferifequalvarianceshadnotbeenassumed: Usingatestprocedurethatadjustsforunequal
variances,therewasnostatisticallysignificantdifferenceintheaccuracyofjudgmentsmadebymen
(M=.35,SD=.09)andwomen(M=.39,SD=.09),t(46.56)=1.81,p=.077,d=.40.
Hereisanexampleofoutputforacommandthatrequestsaseriesofthreeindependentgroupstteststotestforsexdifferencesinaccuracyscoresateachofthefirstthreeblocksoftrials:
t - t est gr oups = sex( 1, 2)/ vars = ach1 ach2 ach3 .
-
8/13/2019 Guide to SPSS for Windows S13
35/53
GuidetoSPSSDr.JohnRuscio p.35of53
Group Statistics
28 .37374 .160267 .030288
78 .45162 .153674 .017400
28 .59253 .129848 .024539
78 .62579 .122760 .013900
28 .37409 .116504 .022017
78 .39612 .102438 .011599
Sex (1=M 2=F)male
female
male
female
male
female
Accuracy, cases 1-20
Accuracy, cases 21-40
Accuracy, cases 41-60
N MeanStd.
DeviationStd. Error
Mean
Independent Samples Test
.063 .803 -2.275 104 .025 -.077889 .034238 -.145784 -.009993
-2.230 46.006 .031 -.077889 .034930 -.148199 -.007578
.307 .581 -1.212 104 .228 -.033270 .027459 -.087721 .021182
-1.180 45.464 .244 -.033270 .028202 -.090056 .023516
1.021 .315 -.941 104 .349 -.022030 .023412 -.068456 .024396
-.885 42.907 .381 -.022030 .024886 -.072220 .028160
Equal variancesassumed
Equal variancesnot assumed
Equal variancesassumed
Equal variances
not assumed
Equal variancesassumed
Equal variancesnot assumed
Accuracy, cases 1-20
Accuracy, cases 21-40
Accuracy, cases 41-60
F Sig.
Levene's Test forEquality of Variances
t df Sig. (2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
Foreachofthesetests,thehomogeneityofvarianceassumptionappearstobesatisfied
Levenestestyieldedapvalueabove=.05. Theresultscouldbereportedasfollows: Accuracyof
judgmentwascalculatedwithinblocksof20trials,theaccuracyscoresforthefirstthreeblockswere
testedforsexdifferences.Womensjudgments(M=.45,SD=.15)werestatisticallysignificantlymore
accuratethanmensjudgments(M=.37,SD=.16)forthefirstblock,t(104)=2.28,p=.025,d=0.50.
Therewasnostatisticallysignificantsexdifferenceateitherthesecondblock(mensM=.59,SD=.13;
womensM=.63,SD=.12),t(104)=1.21,p=.228,d=0.27,orthethirdblock(mensM=.37,SD=.12;womensM=.40,SD=.10),t(104)=.94,p=.349,d=0.21.
6.3RelatedSamplestTest
Thiscommandteststhenullhypothesisthatthemeansofthepopulationsfromwhichtwo
relatedsamplesweredrawnareequal.Mostoften,thetwosamplesconsistofdifferentmeasures
collectedwithinthesamesampleofparticipantsinarepeatedmeasuresdesign,akaawithinsubjects
design. Dataforsomerelatedsamplesttestscomefrommatcheddesigns,wherepairsofindividuals
intwogroupsarematchedtooneanotherandtreatedasrepeatedmeasurements. Toperformthe
relatedsamplesttest,thecommand,t - tes t,isfollowedbythespecificationofpairsofvariableswhosemeanswillbecompared. Ifyoulistmultiplevariables,aseparaterelatedsamplesttestis
performedforeachpairofvariables(asshowninthesecondcommandandsetofoutputprovided
below). Inthefollowingexample,accuracyofjudgmentiscomparedacrossthefirsttwoblocksof
trials:
t - t est pai r s = ach1 ach2 .
-
8/13/2019 Guide to SPSS for Windows S13
36/53
GuidetoSPSSDr.JohnRuscio p.36of53
TheoutputbeginswithatablelabeledPairedSamplesStatisticsthatprovidesbasic
descriptivestatisticsforeachvariable,includingthevalidN,M,SD,andSEoftheM:
Paired Samples Statisti cs
.43105 106 .158472 .015392
.61701 106 .124916 .012133
Accuracy, cases 1-20
Accuracy, cases 21-40
Pair
1
Mean NStd.
DeviationStd. Error
Mean
ThisisfollowedbyatablelabeledPairedSamplesCorrelationsthatyoushouldignore. This
displaysthecorrelationbetweenthetwovariables,whichisonlyindirectlyrelevanttoarelated
samplesttestandisusuallynotreported. Inparticular,donotmistakethepvalueinthistableforthe
resultsofthettest,whichispresentedinthefinaltable,labeledPairedSamplesTest.
Paired Samples Correlations
106 .475 .000
Accuracy, cases 1-20 &
Accuracy, cases 21-40
Pair
1
N Correlation Sig.
Paired Samples Test
-.185957 .148021 .014377 -.214464 -.157449 -12.934 105 .000Accuracy, cases 1-20 -Accuracy, cases 21-40
Pair1
MeanStd.
DeviationStd. Error
Mean Lower Upper
95% ConfidenceInterval of the
Difference
Paired Differences
t df Sig. (2-tailed)
Thetestresultst,df(whichisN1forthistypeofttest),andp(underSig.(2tailed))are
providedinthefinalthreecolumnsofthistable. Notethatthistestdoesnotrequiretheassumptionof
homogeneityofvariance,soitissimplerthantheindependentgroupsttesttointerpretandreport.
SPSSdoesnotcalculateameasureofeffectsize;seeAppendixAfordetailsonhowtocalculateCohens
dbyhand. Inthiscase,theresultscouldbereportedasfollows: Theaccuracyofjudgmentsmade
duringthefirstblockof20trials(M=.43,SD=.16)increasedbyastatisticallysignificantamountinthe
secondblock(M=.62,SD=.12),t(105)=12.93,p
-
8/13/2019 Guide to SPSS for Windows S13
37/53
GuidetoSPSSDr.JohnRuscio p.37of53
Paired Samples Correlation s
106 .475 .000
106 .397 .000
106 .432 .000
Accuracy, cases 1-20 &Accuracy, cases 21-40
Pair1
Accuracy, cases 1-20 &Accuracy, cases 41-60
Pair2
Accuracy, cases 21-40 &
Accuracy, cases 41-60
Pair
3
N Correlation Sig.
Paired Samples Test
-.185957 .148021 .014377 -.214464 -.157449 -12.934 105 .000
.040750 .151808 .014745 .011514 .069986 2.764 105 .007
.226707 .124227 .012066 .202782 .250631 18.789 105 .000
Accuracy, cases 1-20 -Accuracy, cases 21-40
Pair1
Accuracy, cases 1-20 -Accuracy, cases 41-60
Pair2
Accuracy, cases 21-40 -Accuracy, cases 41-60
Pair3
MeanStd.
DeviationStd. Error
Mean Lower Upper
95% ConfidenceInterval of the
Difference
Paired Differences
t df Sig. (2-tailed)
Eachofthethreetestsyieldedstatisticallysignificantdifferences. Theclearestwaytopresent
theseresultswouldbetofocusonthechangefromoneblocktothenext,asfollows: Accuracyof
judgmentwascalculatedwithinblocksof20trials. Accuracyforthefirstblock(M=.43,SD=.16)was
statisticallysignificantlylowerthanaccuracyatthesecondblock(M=.62,SD=.12),t(105)=12.93,p
-
8/13/2019 Guide to SPSS for Windows S13
38/53
GuidetoSPSSDr.JohnRuscio p.38of53
Between-Subjects Factors
4 SP 26
2 SP 27
2 SP, 3 WP 27
2 SP, 6 WP 26
1
2
3
4
ExperimentalGroup
Value Label N
ThisisfollowedbyatableofdescriptivestatisticsthatincludestheM,SD,nforeachgroup:
Descriptive Statistics
Dependent Variable: Accuracy, 100 cases
.43835 .068524 26
.40403 .056030 27
.33447 .090051 27
.34107 .087998 26
.37929 .087445 106
Experimental Group
4 SP
2 SP
2 SP, 3 WP
2 SP, 6 WP
Total
MeanStd.
Deviation N
NextisanANOVAsummarytable. Thisincludesseveralrowsthatyoucanignore: CorrectedModel,Intercept,Total,andCorrectedTotal. Theonlyrowsyouneedarethoselabeled
group(whichisthefactornameinthisanalysisinyouranalyses,thefactornamewillbedifferent,
butitwillappearinthesamerow[3]ofthetable)andError(theerrortermforthisANOVA,
representingwithingroupsvariance). NotethatthecolumnlabeledSig.,containsthepvalueforthe
Ftest,andthedfthatyouwouldreportcomefromtherowslabeledwithyourfactorsname(here,
group)andErrorinthisexample,thestatisticalresultswouldbereportedasfollows: F(3,102)=
11.24,p
-
8/13/2019 Guide to SPSS for Windows S13
39/53
GuidetoSPSSDr.JohnRuscio p.39of53
First,atablelabeledMultipleComparisonspresentstheresultsofallpossiblepairwise
comparisonsofmeans. Thefirsttwocolumnsindicatewhichconditionsarebeingcomparedineach
rowofthetable,andtheSig.columncontainsthepvaluesforeachofthesecomparisons.Whenever
thepvalueislessthanyourpreferredlevel(typically.05),thenullhypothesisofequalityisrejected
andyouconcludethatthesetwogroupsweredrawnfrompopulationswithdifferentmeans. Inthe
presentcase,thefollowingexpressionindicateswhichgroupsdo(anddonot)differfromoneanother
statisticallysignificantly(using=.05):
([4S]=[2S]) ([2S+3W]=[2S+6W])
Inotherwords,conditionswithnoweakcuesdidnotdifferfromoneanother,notdidconditionswith
weakcues,butbothconditionswithnoweakcuesdifferedfrombothconditionswithweakcues. To
writetheresultsofthisANOVAandposthoctestinAPAstyle: Accuracyofjudgmentdiffered
statisticallysignificantlyacrossthefourexperimentallymanipulatedcueconditions,F(3,102)=11.24,p
-
8/13/2019 Guide to SPSS for Windows S13
40/53
GuidetoSPSSDr.JohnRuscio p.40of53
Accuracy, 100 c ases
Tukey HSDa,b,c
27 .33447
26 .34107
27 .40403
26 .43835
.989 .370
Experimental Group
2 SP, 3 WP
2 SP, 6 WP
2 SP
4 SP
Sig.
N 1 2
Subset
Means for groups in homogeneous subsets are displayed.Based on Type III Sum of SquaresThe error term is Mean Square(Error) = .006.
Uses Harmonic Mean Sample Size = 26.491.a.
The group sizes are unequal. The harmonic meanof the group sizes is used. Type I error levels arenot guaranteed.
b.
Alpha = .050.c.
6.5RelatedSamplesANOVA
Thisprocedureteststhenullhypothesisthattwoormorerelatedsamplesaredrawnfrompopulationswiththesamemean. Onceagain,usuallyanANOVAisperformedonlywhenthereareat
leastthreemeanstocompare,becausearelatedsamplesttesthandlesthesimplercaseofcomparing
tworelatedsamplesmeans. Thegl mcommandperformsthistypeofANOVA,anditrequiresthe
specificationoftheseriesofvariablesthatcontainthedatafortherelatedsamples(typicallyrepeated
measurementsonthesamecases,butsometimesscoresformatchedsamples). Intheexampleshown
here,theaccuracyscoresforthefirstthreeblocksoftrials(ach1,ach2,andach3)arecompared. The
firstsubcommandisrequired,anditiswhereyouprovidealabelforthesinglefactorintheanalysis
andtellSPSShowmanylevelsthereare. Inthiscase,thelabelofbl ockwasprovidedandthereare
threelevels(ach1,ach2,andach3). Youcanuseanylabelyoulike,solongasitisnotaterm
reservedforSPSSsyntaxoranexistingvariablename. Thislabelwillbeusedintheoutputtoidentify
thetestofthisfactor. Thenextsubcommandrequestsdescriptivestatisticsandameasureofeffectsize
(2),andthefinalsubcommandinformsSPSSthatyouwantittousethedefaultwithinsubjectsdesign.
gl m ach1 ach2 ach3/ wsf act or bl ock ( 3)/ pr i nt desc et asq/ wsdesi gn .
Theoutputisvoluminous,andperhapsthetrickiestpartofworkingwiththistypeofanalysisis
findingtherelevantportionsandignoringtherest. Thefirsttable,labeledWithinSubjectsFactors,
simplysummarizesthelevelsofthefactor. Inthiscase,youcanseethatthebl ockfactorhasthree
levels,andthatSPSSunderstandsthatyouwantedtouseach1,ach2,andach3asthethreelevels:
Within-Subjects Factors
Measure: MEASURE_1
ach1
ach2
ach3
block
1
2
3
DependentVariable
-
8/13/2019 Guide to SPSS for Windows S13
41/53
GuidetoSPSSDr.JohnRuscio p.41of53
Thenexttablepresentsdescriptivestatisticsforeachlevelofthefactor,includingitsMandSD:
Descriptive Statistics
.43105 .158472 106
.61701 .124916 106
.39030 .106211 106
Accuracy, cases 1-20
Accuracy, cases 21-40
Accuracy, cases 41-60
MeanStd.
Deviation N
BeyondthispointareANOVAresults,calculatedintwoways,plusatestofanassumptionthat
isanalogoustohomogeneityofvariance,calledsphericity. Thedetailsofwhatthisassumption
entails,howitistested,andhowtohandleitarebeyondthescopeofthisguide;agraduatelevel
statisticstextwillprovideinformationonthissubject.Withtheunderstandingthatthisisnotalways
themostappropriatewaytoproceed,whatfollowsisasimplifiedapproachtointerpretingand
reportingtheresultsthatignoresthisassumption.
Providedthatyouarewillingtoignorethesphericityassumption,youcanskipthetableslabels
MultivariateTestsandMauchlysTestofSphericity,proceedingstraighttotheANOVAsummary
tablelabeledTestsofWithinSubjectsEffects.
Multivariate Testsb
.788 193.323a 2.000 104.000 .000 .788
.212 193.323a 2.000 104.000 .000 .788
3.718 193.323a 2.000 104.000 .000 .788
3.718 193.323a 2.000 104.000 .000 .788
Pillai's Trace
Wilks' Lambda
Hotelling's Trace
Roy's Largest Root
Effectblock
Value F Hypothesis df Error df Sig.Partial EtaSquared
Exact statistica.
Design: InterceptWithin Subjects Design: block
b.
Mauchly's Test of Spherici ty b
Measure: MEASURE_1
.944 5.940 2 .051 .947 .964 .500
Within Subjects Effectblock
Mauchly's WApprox.
Chi-Square df Sig.Greenhouse-Geisser Huynh-Feldt Lower-bound
Epsilona
Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables isproportional to an identity matrix.
May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed inthe Tests of Within-Subjects Effects table.
a.
Design: Intercept
Within Subjects Design: block
b.
ThestandardANOVAsummarytableisshownbelow,anditincludesameasureofeffectsize
(2). Onceagain,ifyouarewillingtoignorethesphericityassumption,youcandrawresultsfromthe
firstofthefourrowswithineachcellofthetable(labeledSphericityAssumed).Notethatthedfthat
youneedtoreportappearintherowslabeledwiththewithinsubjectsfactor(here,block)andits
errorterm(here,Error(block)). TheresultsappearingbelowcouldbereportedinAPAstyleas
-
8/13/2019 Guide to SPSS for Windows S13
42/53
GuidetoSPSSDr.JohnRuscio p.42of53
follows: Therewasastatisticallysignificantdifferenceinaccuracyofjudgmentsacrossthefirstthree
blocksof20trials,F(2,210)=153.83,p
-
8/13/2019 Guide to SPSS for Windows S13
43/53
GuidetoSPSSDr.JohnRuscio p.43of53
6.6FactorialANOVA
Thisprocedureteststhenullhypothesesthatcorrespondtomaineffectsandinteractionsina
factorialANOVAwithstrictlybetweensubjectsfactors. Theuni anovacommandperformsthistype
ofANOVA,anditrequiresthespecificationofthedependentvariable(here,ach100,themeasureof
accuracyofjudgment)andthecategoricalvariablesthatdefineeachfactor(here,groupandaccount,
thetwoindependentvariables). Recommendedsubcommandsrequestdescriptivestatisticsandposthoccomparisonsofmeans.Notethatyoucanrequestposthoctestsforeachfactorinthedesignthat
hasmorethantwolevels. Intheexampleshownbelow,gr oupvariesacrossfourlevelsandaccount
variesacrosstwolevels,soposthoctestswererequestedonlyfortheformer. TukeysHSDisspecified
astheposthoctechnique,butmanyothersareavailable(seetheSPSShelpmaterialsfordetails).
uni anova ach100 by gr oup account/ post hoc gr oup ( t ukey)/ pr i nt desc et asq .
TheoutputbeginswithatablelabeledBetweenSubjectsFactorsthatsummarizesthefactors
andlevelsthatwerespecifiedinthecommand. Youshouldverifythatthisiswhatyouintended.
Between-Subjects Factors
4 SP 26
2 SP 27
2 SP, 3 WP 27
2 SP, 6 WP 26
no 51
yes 55
1
2
3
4
Experimental Group
0
1
Social Accountability
Value Label N
Nextisatableofdescriptivestatisticsthatincludesthen,M,andSDforeachcellofthedesign,
aswellasthemarginalmeans. Iftherewasamaineffectforexperimentalgroups,youwouldusetheMsandSDsforthefourlevelsofthisfactor,whicharepresentedintheTotalrowsforeachlevel:Ms
=.43885,.40403,.33447,and.34107. Iftherewasamaineffectforsocialaccountability,youwoulduse
theMsandSDsforthetwolevelsofthisfactor,whicharepresentedintheTotalnoand
Totalyesrowsnearthebottomofthetable:Ms=.38582and.37323. Iftherewasaninteraction
effect,youwouldusetheeightmeansinthecellsofthetableallrowsthatdonotcontainaTotal.
-
8/13/2019 Guide to SPSS for Windows S13
44/53
GuidetoSPSSDr.JohnRuscio p.44of53
Descriptive Statistics
Dependent Variable: Accuracy, 100 cases
.43723 .045967 12
.43932 .085086 14
.43835 .068524 26
.42004 .038517 12
.39122 .065338 15
.40403 .056030 27
.35427 .076816 13
.31608 .100077 14
.33447 .090051 27
.34171 .074845 14
.34033 .104775 12
.34107 .087998 26
.38582 .073368 51
.37323 .099029 55
.37929 .087445 106
Social Accountability
no
yes
Total
no
yesTotal
no
yes
Total
no
yes
Total
no
yes
Total
Experimental Group
4 SP
2 SP
2 SP, 3 WP
2 SP, 6 WP
Total
MeanStd.
Deviation N
NextisanANOVAsummarytable. NotethatthecolumnlabeledSig.,containsthepvalue
foreachFtest. Formostpurposes,youcanignoreseveralrowsofthetable,includingthoselabeledCorrectedModel,Intercept,Total,andCorrectedTotal. TherowsthatcontainFtests(and
effectsizes)thatshouldbeinterpretedandreportedincludemaineffects,oneperbetweensubjects
factor(here,groupandaccount ),andinteractions,whichinvolveallmultiplicativecombinationsof
factors(here,theonlyinteractiontermisgroup * account becausethereareonlytwofactors).Note
thatthedfforeachFtestappearontherowwiththeFvalueandtherowlabeledError. Forexample,
statisticalresultsforthegr oupmaineffectwouldbereportedas: F(3,98)=11.04,p
-
8/13/2019 Guide to SPSS for Windows S13
45/53
GuidetoSPSSDr.JohnRuscio p.45of53
11.04,p
-
8/13/2019 Guide to SPSS for Windows S13
46/53
GuidetoSPSSDr.JohnRuscio p.46of53
7. CHISQUAREANALYSES
7.12GoodnessofFitTest
Thisprocedureteststhenullhypothesisofnodifferencebetweenobservedandexpected
frequenciesacrossaseriesofcategories. Because2isonetypeofnonparametricstatistic,SPSS
implementsitusingitsmoregeneralnpar t est procedure(shortfornonparametrictest). Thefirst
subcommandrequestsa2analysisofaspecifiedcategoricalvariable(here,sex),andthisisfollowed
byasubcommandthatspecifiestheexpectedfrequencies. Onewaytodothisistogenerateexpected
frequenciesbydividingthetotalsamplesizeintoequalsizedcategories. Inthefirstexampleshown
below,thetotalof106casesissplitintoexpectedfrequenciesof53menand53women:
npar t est/ chi square = sex/ expect ed = equal .
Theoutputissimple. Thefirsttableshowstheobservedfrequencies(ObservedN),expected
frequencies(ExpectedN),andthedifferencebetweenthese(Residual):
Sex (1=M 2=F)
28 53.0 -25.0
78 53.0 25.0
106
male
female
Total
Observed N Expected N Residual
Thesecondtableshowsthevalueof2,thedf(numberofcategories1),andpvalue(Asymp.
Sig.).:
Test Statistics
23.585
1
.000
Chi-Squarea
df
Asymp. Sig.
Sex (1=M2=F)
0 cells (.0%) have expected frequencies less than5. The minimum expected cell frequency is 53.0.
a.
InAPAstyle,theseresultswouldbereportedasfollows: Theobservednumbersofmen(n=
28)andwomen(n=78)statisticallysignificantlydifferedfromanequalsplit,2(1,N=106)=23.59,p
-
8/13/2019 Guide to SPSS for Windows S13
47/53
GuidetoSPSSDr.JohnRuscio p.47of53
Notethattheexpectedfrequenciesmustbelistedintheorderthatthecategoriesarecoded.
Becausesexiscodedas1=male,2=female,theexpectedfrequencyformenappearsbeforethatfor
women. Theoutputappearsbelow:
Sex (1=M 2=F)
28 35.0 -7.0
78 71.0 7.0
106
male
female
Total
Observed N Expected N Residual
Test Statistics
2.090
1
.148
Chi-Squarea
df
Asymp. Sig.
Sex (1=M2=F)
0 cells (.0%) have expected frequencies less than5. The minimum expected cell frequency is 35.0.
a.
Theseresultswouldbereportedasfollows: Theobservednumbersofmen(n=28)and
women(n=78)didnotdifferstatisticallysignificantlyfromtheexpected1:2ratioofmentowomen,
2(1,N=106)=2.09,p=.148.
7.22TestofIndependence
Thisprocedureteststhenullhypothesisthattwocategoricalvariablesfrequenciesare
distributedindependently.Moreintuitively,thisisatestoftheassociationbetweentwovariables. If
thenullhypothesisofindependenceisrejected,thenknowledgeofascoreononevariablepredictsthe
scoreontheothervariablebetterthanchance. SPSSimplementsthistestusingthecr osst abs
command(shortforcrosstabulations). Thepairofvariablestobetestedforindependenceis
specifiedonthefirstsubcommand;twoadditionalsubcommandsrequesthelpfuloutput(the2
statisticplusobservedandexpectedfrequenciesineachcellofthetableofcrossclassifications).
Intheexampleshownbelow,atestisperformedtodeterminewhethermenandwomen(the
sexvariable,codedas1=male,2=female)wereequallylikelytohavetakenacalculuscourse(the
cal cvariable,codedas1=yes,0=no).WhereasSPSSrequiresthespecificationofexpectedvaluesto
performthe2testforgoodnessoffit,itcalculatestheseautomatically(usingthemarginaltotals)to
performthe2testforindependence.
cr osst abs
/ t abl es = sex by cal c/ st at s = chi sq/ cel l s = count exp .
TheoutputbeginswithaCaseProcessingSummarythatindicateshowmanycases(ifany)
weremissingdata.Here,therewasonlyonecasemissingdata:
-
8/13/2019 Guide to SPSS for Windows S13
48/53
GuidetoSPSSDr.JohnRuscio p.48of53
Case Processing Summary
105 99.1% 1 .9% 106 100.0%Sex (1=M 2=F) *Calculus course
N Percent N Percent N Percent
Valid Missing Total
Cases
Thenexttablepresentsthecrossclassificationofcases. Ineachcell,theobservedfrequency(Count)appearsabovetheexpectedfrequency(ExpectedCount);thelatteriscalculatedastherow
totaltimesthecolumntotaldividedbythetotalsamplesize(e.g.,fortheupperrightcell,menwho
tookcalculus,2888/105=23.5).
Sex (1=M 2=F) * Calculus course Crosstabulation
2 26 28
4.5 23.5 28.0
15 62 77
12.5 64.5 77.0
17 88 10517.0 88.0 105.0
Count
Expected Count
Count
Expected Count
CountExpected Count
male
female
Sex (1=M2=F)
Total
no yes
Calculus course
Total
Thedifferencebetweenobservedandexpectedfrequenciesprovidesatestoftheindependence
ofthetwovariables. The2value,df(fromthecrossclassificationtable,numberofrows1times
numberofcolumns1),andpvalueareprovidedinthefinaltable,labeledChiSquareTests.
Usually,thePearsonChiSquareresultsareused.
Chi-Square Tests
2.303b
1 .1291.484 1 .223
2.641 1 .104
.229 .108
2.281 1 .131
105
Pearson Chi-SquareContinuity Correctiona
Likelihood Ratio
Fisher's Exact Test
Linear-by-LinearAssociation
N of Valid Cases
Value df Asymp. Sig.
(2-sided)Exact Sig.(2-sided)
Exact Sig.(1-sided)
Computed only for a 2x2 tablea.
1 cells (25.0%) have expected count less than 5. The minimum expected count is 4.53.
b.
Becausethisisa2testofindependencewithonly1dfinotherwords,thedataforma22
tableyoucancalculate N
2
asameasureofeffectsize;thisisinterpretedusingthesamerulesof
thumbasforr(.10=small,.30=medium,.50=large;seeAppendixCforadditionalinformation).In
thiscase, 1481.105
303.2 . Forthisexample,onecouldreporttheresultsinAPAstyleasfollows:
Menandwomendidnotdifferstatisticallysignificantlyintherelativefrequencywithwhichthey
tookacalculuscourse,2(1,N=105)=2.30,p=.129,=.15.
-
8/13/2019 Guide to SPSS