1 Data Input Raw data ein come in a variety of sources Otic of the iudsI common data collcclion methods is mini Mirptj/S which can be administered using formal inlerview KsWdulM ot self-completion questionnaires such as Ihe ex>niiin,iiie make up .1 single complete trennt Each other person who answers I he questionnaire would alto become a case in the dala. (You may find in sume manuals that the word* record' or 'observation' are sometimes used In the place of 'case'.) Cases, such as survey respondent», personnel records or medical flits, often correspond In individual people. Cases, however, ran also refer to orgatümlkH» or limofaiiu. For instance, in ho» 1 trhol d survey. kJw Information obtained relates to the entire household rather than to indi-vuiuals within the house In this Instance the case would be the household, not the individual. II is also possible to have, (or example, a dalabase of hospitals (wheic each case is the information held on a complete hospital) or a geographically based datnsitt (where information on complete cities makes up the CMM) A historian might have a database where the cases arc UnKipirii S3> Ihepointis that, in each instaiKe, theca»« is the information recorded cm a single unit of analysis. Por each Gtsr. the specific bits of information recorded for the case are called Variables. In the l)jinking questionnattc' (Appendix 1), each sepjrate answer yon gaV4 is a response lo a variable in the datosrt. Pol instance, age. where you said you IN X years old is a variable] and your response to Question 5, where you said you wtw think ňUoliollihink mrťiy/utink ,'1,/í/nid, /'rnfíiťNíV''"''1 hriwnV 's «""'her variable Your particular answers to these questions are the nthx* tltat these variables have for you. A different person answering the M ÜAIa INPUT 31 quCuHonnwre would give response» to the same quest ions/ variables hut Iheii values for those variables could be different. For Instance their name. age. faculty and drinking habits could be dirlVrtnt from yours. Here arc two additional example» a A medical admission being the OWr, with iviiniWci being things like the cause of admission, the CV who attended, etc. • If a household was the MK MnVlMal could be things like the number of peop!e4tong in the house, tenure of housing, household income, the type of healing in lite house, etc These concepts (cases, variable« ami values) are fundamental for any kind of dala analysis. Think about them one more lime, and make sure you understand how Ihey relate lo one another. The questions you ask. or the types of information you record, are variables. Each individual answer or piece of information is a value. The people or things you test in the »ludy are cases ... For each i.i»e. you luve one value for each vanablc (Norusij. lOftS. pel) 'Rectangular' format Compute)* keep Irack of Ihe Wis of information on cases by always having a variable's Information (calWgs) appear in the same location. For most datasets. the data usually appear m what we can call a grid* of ram by wrinMrs Each ojs/. or lecord. makes up one complete line' nl data and the iwrimVrs appear as columns. We can show how this would look (or the answers wime other people gave to Ihe 'Drinking questionnaire" (Figure 1.1) Figure 1.1 KwtponiM lo i>e Urinking «mfennAire' m grid term« 001 r-':roc. 1 ,. 1 > 1 8 ■1 .» .' 002 VLi-uare: i 23 j 1 1 2 I 0 0 i :i;i iľ-i?d 1 V ;t ■ 1 2 1! 2 1 4SB UCM Pa^iy t ;mj '. ' 1 1f, '' 10 0 ' = Kobcrt's responses to the questionnaire arc presented in a row format Fach respondent is given 0 unique identifier. Robert for example has been allocated 00), and Margaret has been allocated CO? The third column contains delmls of the respondent's gender. The find case. Robert, is male winch has the value I, aod the secood respondent, Margaret, is female which ha* the value 2. All cases reserve space' for each variable. In responding to the questionnaire, respondents may not answer all Ihe questions. Ihus some information may be iumwh*. for some v«iables. For example, someone answering the Dunking questionnaire may rtol be able to remember how much they spent on alcohol l.int weekend or might reluse lo tell how much they drank U is important to record this datu as mi«»«. In some instances it may be that the question is 110' rtkvtwt For example, if the respondent did not drink alcohol during the previous weekend (Question 6) Ihey did not need to complete Questions 7 and ft about types of alcohol con turned and the amount spent In this Instance a "not relevant' code might be used for Questions 7 and ft. (We will return lo llvis below ) 89 32 SPSS FOR SOCIAL SCIENTISTS Exercise As an exercise, try transferring jaw responses to the questionnaire on to 'line 005' of the grid in Figuie 1.1. Inputting data into SPSS II is possible lo input dala inlo SPSS in a number of ways. Since the SPSS 'data grid' is in the form of a spreadsheet, the normal conventions for using a spreadsheet apply. This mean* that data can be brought into SPSS in one of four ways: I. Imported from SPSS on another computer as an SPSS Portable file (\por) ?,. Imported from ihlnlmse $yr/tul$licet$ (for example. Excel, dBase. Foxpro. Access) 3. Imported from text files (aseÜ-files)- 4. Entered directly onto Ihe SPSS Duh FJHor window. Option 1: importing an SPSS portable file Often we will wnnl lo transfer a SPSS data file from one computer to another. This is accomplished by putting the data file that is to be transferred into a special form — a SPSS Figure 1.2a Importing a SPSS portable file (BSACrime) using File Open Data &Ä•!"'• tri*■■.i'*rtfs>'.:ŕ"kÍjW;■£■!<*,•■■ \}&t:': Ľ'Ä*. Ě*t ■-;* ■■ľ- Äiig^T-'rl pü *»*■ feJ&3E&il5&l HUMUM II ■ II ■ IJ C«rl -■._:■.:.'...-•— 1—: c= XT _.J. — ■-■ • --I •JiTv..««* .... 4 If»«* DATA INPUT 33 iv/!iihl? Hi''- The data is read from the portable file and immediately saved as a normal SPSS data tile. 'The reason we do this is that the 'internal architecture' of computers can differ ami there is no guarantee that a SPSS data file lhal woiks fine on one computer will always work automatically on another.) Below, we have an example of importing the USA Crime dataset. iMcile that before you begin, you already have to have downloaded the SPSS portable file for the Crime dataset from Ihe Palgiave web site onto the hard disk of your computer. Instructions on how to do this arc given at the Palgrave web site (htlp//;www.palgrave.com/ sociology /miller) and in the Appendix lo the Orientation chapter, p. 30.) Click Oň Ihe File menu, then on Open and then choose Data... A window like that in Figure l-2a will open up. Go to Ihe 'Look in' box in the O/'iw File window and select the folder on you' hard disk where you have saved Ihe BSACrime portable file. (In our example Ihe name of Ihe (older is '$i'$$tlnto'.) Open the 'pull down' menu for 'Files of t^pe'. scroll down and select 'SPSS portable |*.porJ'. Now, highlight the file named 'BSACrime.por (it may be Ihe only *.por file appearing on your computer screen). The file's name should appear in "File name' box. Now. click on the 'Open' button and the data for the Crime dataset should fill the data grid. You now need to save the imported data as a normal SPSS dala file. It is quite easy to do this: click on the File menu again and then on Save As... A window like that in Figure 1.2b should appear. Click on Ihe 'Save button and the data grid will be saved as a normal SPSS data file (BS/lCmiic.Aiy). Later on. when you want to analyse the Crime dataset, you always will call up the SPSS \sav file. BSAOiinesw. Fiyuro 1.2b Saving an imported SPSS portable file (BSACrime) as a SPSS'.sav file a 23 23 «.mein 5*3!*' -.-'-■* */i-«V|.JS«iJ« j aj aj c?l IE3OT|. I-':'--' ; [oír'WT ůjoswimt* i \<-Pl j&ßsvnu'iL* i Ö est'. ::i---: «mSSA T ^*" syn» gniti «Monti Iviks" nEtíä» ■ i.iil-rj ■iní« acvtVnŠ' ÍUMjtjrj .KMMqiesotr^.ntiM. rva*™ . ŠaveubW ItMW SPSÍ|-Wecn chosen). DATA INPUT 35 $,ime caution is needed when importing files from different applications. Cheek if the SPSS ivrsion you are using can read the latest version of the database application yo1' want to inwurt- ľ SPSS cannot read the latest version, save the spreadsheet data using a version which oin be read by the SPSS programme you are using. SPSS also provides the option to import database files using the Capture Wizard using the pull-down menu. Click on the File menu as before, then on Open Database and then choose New Query to Open the capture Database Wizard. A window like that in Figure t.Zd will appear. The Database Wizard provides a set of siep-by*step instructions that can be followed Id introduce a database file into SPSS. Figure 1.2d Importing spreadsheet files from other applications using Database Wizard Welcome To Ih* Dalabase Wizard! iŕslJíikv« ■'.■ ' -- '■-■ ' '.".-! ■"'. ■'. Bit] -:<'■- ■■■• —.ó'-' 9l>*PO tlil Var IS"': ■:-■■«:. S"".HoFc li*! 'l r ív(. :>•«-■ . . Ort -H* Indicate the file 'VPO -e.g. dBase file o< Excel Files Remember to add the locution Ih procedures open an empty file on the Data Editor window. Remember lhal the Data Editor in SPSS VTO has two formats: • Dfltn View, which is the spreadsheet for entering the data »aEjT WiOÔttM I v.rtXOM ■ 3 Koa a i «liar .*"''". »51 M 62 Each rov; represents a respondent or a case (Each column represents a response to a question — a Variable Editing data 'it c ö ta w u o CO CO D* (0 r-i O o OJ t c -O o Q* K UJ If is possible lo edit or cUangt dala in an existing dala file by locking llie data you wish to edit, clicking once on the cell, and replacing the old value in the cell by typing in a new value. You might want lo edit data if you discover errors or ui/shths in the existing data, Data editing can be don« at any time, not just when a new dolose) is first being created. Entering new variables or eases It is possible lo enter new variables or cases to a dala file. To insert a new case (for instance, a ' new respondent to a survey), simply select a cell in the row above which you want to insert ihe new row. Go to the Data main menu and click lo open it. Click on Insert Case or click on the Insert Case button on the toolbar. This creates a new rov/, into which the data can be entered. AlleiWlively, go to Ihe empty rows at the bottom of Ihe grid and enter the data onto Ihe first empty row. To inserl a new variable (or column), selecí any cell in Ihe column to the right of which you want the new column. Open the Data main menu and click on Insert Variable or click on the Insert Variable button on the toolbar. This creates a new voiiablc. into which new dala can be entered. Again, allematively you can go to Ihe empty columns at the far-right-hand side of the grid and enter the data into Ihe first empty column. Deleting a variable or etise It is possible to delete a variable or case. To delete a case or row click on the case number on the shaded column in (he left side of the file. This will highlight the entire row, then open the Edi) main menu and click Clear or press )he Del key. (In Figure 1.3a, we are deleting the variable Margaret.) DATA INPUT 39 Wmi - -'"■ n.'.»r.< i: i Figure 1.3a Deleting ň case [t( I* tf" 1!" l'*i*m ŕ1*" G*" W*«' '<,•!*- u>o giaja; bi| _j ~.| -bis I n\ «rf ' i < i,iii "i ir míli mi—h i mm_nLiii y i .-is.. .*"* u IH C«Wr H.U * " 5— f-----iff Click on case numbered the case you want lo delete - this highlights the entire row. Click on Del key. To delete a variable 01 column click on the variable label on the shaded row (Figure 1.3b>. This will highlighl the entire variable, open Ihe Edit main menu and delete the column by clicking Clear or press the Del key. (Here, we arc deleting Ihe variable age.) Figure 1.3b Deleting 3 variable ■-'I— Ml *äq[..Mür a"~">* ■■£] 1 —st—jJT'T"í-------1 Click on the variable name -this highlights the column. Click on Del (toy. Saving new files It is important to name and save the new datafile you have created. Do not wail until you have entered all the data, as computer malfunctions or power culs can result in lost work. To save the file you musl assign a unique name to the file which identifies Ihe data which the file contains. For example, we might assign Ihe name drmksunXjf to Ihe file which contains the data from Ihe survey. Piles can be saved using by opening the File main menu and selecting Save As. Then use the dialog box lo select the directory or disk (floppy disk) in which you want to save the data. Enter the new name of Ihe file in the File Name Box (In Figure l.3c, drinksunnv) and click OK. SPSS will save the data file as an SPSS data file (\sav) us il is at the point in time when you save the data. Later on. if you make additional changes to the data file that you also want to be saved, you will want lo save the newer version of the data file again. (See the Orientation chapter, p. 25. for more details about saving files.)