TheVeryBasicsofSPSS(ver.16andup,Windows)StatisticalComputingGroup@ResearchDataServicesSAS,UniversityofPennsylvaniaLastmodified:03/16/2009ThisonlineseminaristohelpyougetstartedwithbasicdatamanagementandanalysisinSPSS.Itisforthosepeoplewho:ArenewtostatisticaldataworkandwanttolearntouseSPSStomanagedataandperformcommonanalysis.Tooksomeundergraduate(orperhapssomegraduate)introductorystatisticscourseinSPSSlongagoandwanttorefreshtheirmemory.SPSSisoneofthemostuser-friendlycommercialstatisticalpackages.Assuch,evenbeginnersofstatisticalanalysiswouldfinditspoint-and-clickanddialogueboxesinterfaceveryapproachableandeasytouse.However,inthelongrun,youwillbenefitalotmorebylearningSPSSbySPSSSyntax.Theprosofthesyntaxapproachare:•Anefficientwayfordocumentationandreproducibility(thisisthereasonIwouldstronglydiscourageyoufromkeepingrelyingonthepoint-and-clickapproach).•Muchquickerandefficientonceyoulearnhowtowriteandrunsyntaxcommands.•Canperformthingsunavailable/inaccessiblefromthepoint-and-clickmenus.So,thisonlineseminarattemptstoprepareyouforwritingsyntaxcommandsyourselfinthefuturetoperformsimpledatatasksandrunbasicprocedures.Asidefromthisonlineseminar,youhaveaccesstoalotofgreatinstructionalSPSSresourcesonlineforfree.Westronglyrecommendthatyouusethoseresourcestothefull.ThisonlineseminarassumesthatyouareusingSPSSver.16andup.Beawaretherearesomesignificantchangesbetweenver.15andbeforeandver.16on.Contents:1.GettingStarted:Let’sOpenSPSSandBringinData.................................................................22.HowtoGetDescriptiveStatisticsandGraphs..........................................................................143.HowtoDefineVariableProperties...........................................................................................294.HowtoCreateandRecodeVariables.......................................................................................335.HowtoSubset(Select)Data.....................................................................................................456.HowtoSortandSplitData.......................................................................................................537.SimpleRegressionExample.....................................................................................................5711.GettingStarted:Let’sOpenSPSSandBringinDataInthissection,wewillplaywiththeSPSSwindowsandgetabroadideaofwhatthingslooklikeintheSPSSenvironment.Insodoing,wealsolearnhowtobringdatainSPSS.BytheendofthissectionwewillhavearoughbutgoodideawhatroleeachwindowplaysforyourdatamanagementandanalysisworkandhowtogetSPSSreadyforourwork.First,let’screateaworkingdirectoryforthispracticeinwhateverlocationyouprefer.Itisalwaysagoodideatokeeponeprojectdirectoryforoneproject.Let’scallthisnewworkingdirectory“verybasicSPSS.”Thendownloadfromherethedatafileswearegoingtouseinthisonlineworkshop.Savethemintheworkingdirectoryyoujustcreated.Now,let’slaunchtheprogram.ClickontheSPSSicon,ORChoosefromWindow’sStartmenuSPSS1x.x(whateverversionyouhave;thisworkshopisusingVersion16)forWindows:StartProgramsSPSSforWindowsSPSS1x.xforWindowsSomeofyoumayhaveadialoguebox(called“SPSSforWindows1x.x[yourversion]”)poppingupasking“Whatwouldyouliketodo?”.Inthatcase,let’sjustclickon“Cancel”fornowandgoseewhatwindowswehaveintheSPSSinterface.YoushouldbeseeinganuntitledSPSSDataEditorwindownow(likebelow).TheDataEditorwindowshowsyoutheworking(=currentlyopen)datasetinaspreadsheetformat.Ofcourse,itisnownewandempty.Youseetherearetwosheetsinthiswindow,theDataViewandtheVariableView.Currently,theDataViewisactive(inyellow).YouseeamessagefromSPSSatthebottomofthewindow.Currently,itis“SPSSProcessorisready”foryourwork.2Beforegettingstartedwithourwork,let’schangetheoutputsettings.Fromthemenubatatthetop(ofwhicheverwindow),EditOptions…Thiswillbringyouthe“Options”dialoguebox.Here,youcancontrolwhattodisplayinyouroutput.Clickthe“Viewer”tab.HereisonesettingIstronglyrecommendthatyouchoose:“Displaycommandsinlog.”Youwillseewhyinamoment.Fornow,justchecktheboxandclickOK.Now,let’sfirstbringinadata.We’llusethesefilesforthispractice.xls_gss93.xlscsv_gss93subset.csvfix_gss93subset.datGSS93subset.sav*Thesecondandthirdfilesaresubsetsofthelastone“GSS93subset”data(7variables,97observations)indifferentformatsforourpracticepurpose.ReadingDatafromExcelFilesWewillstartwithimportingtheexcelfile“xls_gss93subset.xls”intoSPSS.First,opentheexcelfileandunderstandhowitisformatted.Thefirstrowhasvariablenames,andthedatapartisfromthesecondrowandbelow.Closetheexcelfileandlet’sstartreadingthisfileintoSPSS.3StartSPSSbyclickingontheSPSSiconorfromtheWindow’sStartmenu.FromtheSPSSmenubatatthetop,go:FileOpenData…Thisbringsupadialoguebox“OpenData”asshownbelow.Gotoyourworkingdirectory“verybasicSPSS,”thenselect“Excel(*.xls)”formatfrom“Filesoftype.”Thenselecttheexcelfile“xls_gss93.xls”yousavedthere.ThenclickOpen.(seebelowforavisualizedinstruction).(4)ClickOpen.(3)Selectthisfile.(2)“Filesoftype”isExcel.Thisbringsupourexcelfileintheabovewindow.(1)Gotoyourworkingdirectorywhereyousavedtheexcelfile