SPSS 11.5 for Windows Workshop

John Sideris, M.A.
L.L. Thurstone Laboratory
CB 3270
University of North Carolina, Chapel Hill
Chapel Hill, NC 27599
919-962-7643

SPSS is a statistical package designed for broad application. This is a powerful tool that can handle a variety of data, data management and analysis problems. It is relatively straightforward system that allows either a point-and-click or written code interface.

Part 1 – 3 Windows – SPSS uses three interactive windows to communicate with the user: the Data Editor, Output and Syntax.

  1. The Data Editor – this is for entering, editing and viewing the data. There are two “sub-windows,” the Data View and the Variable View. You can only have one data editor open at a time. Opening a new one clears the current data (after a save prompt) More on these later. Notice the pull-down menus along the top. Again more on those later.
  2. The Syntax Window – To get to the syntax window click on File, New, Syntax. The syntax window is for those users who prefer to write code. As we’ll see there are cases where writing code is much preferable to the point and click.
  3. The Output Window – This is where SPSS writes your results. There are a number of options that can be helpful.

Part 2 – Entering and managing data

  • Data can be entered in at least three ways: typing directly into the data editor (data view) window, opening an existing SPSS file, or opening a flat file (e.g., ASCII, Excel, etc.)
  1. By hand
  2. Data view – this is essentially a spreadsheet
  3. Variable view – allows you to define the format of each variable
  4. Existing SPSS file – File, Open, Data
  5. Flat file – File, Open, Data; in the dialog box select the kind of data you have and click OK. SPSS with then guide you through the process.
  6. There are methods for entering data from the syntax window as well. A lot of ways. We won’t be covering the today, but you may find yourself in a situation where you need to. And it is possible.
  7. Variable view – formatting
  1. Name – up to 8 characters
  2. Type – numeric, string, date, etc.
  3. Width – spreadsheet is a fake, the data are actually in a sort of ASCII file, this is how many characters each variable gets.
  4. Decimals
  5. Label - Use this to make up for ambiguous variable names
  6. Values – For nominal or ordinal data you may want to assign values to different level of the data
  7. Missing – missing data codes
  8. Columns – where in the file the variable begins
  9. Alignment – in the column
  10. Measure – Nominal, ordinal, scale
  11. Data management
  1. File – Opening, saving, etc. Note the “Recently used…”
  2. Edit – Pretty much standard edit pull down stuff except for the options. This window lets you really customize the way you do things.
  3. Data – There is a lot here for you
  4. Define data properties – dialog box to do the stuff we did in the variable view
  5. Copy data properties – pulls in data properties from other SPSS datasets into the current dataset
  6. Define dates – this, well, defines dates
  7. Insert variable, cases
  8. Sort cases – allows to reorganize your observations by the values of one or more variables – this a key operation
  9. Transpose – cases become variables, variables become cases
  10. Restructure – similar to the above, but by bits and pieces
  11. Merge files – merges files. Either by adding cases or adding variables. If you are adding variables, there must be at least one variable in common between the datasets (e.g., ID) and both sets must be sorted on the common variables
  12. Aggregate – allows you to collapse data across cases. Say you have data on the grades of individual student in 100 schools, but what you are really interested is in comparing the schools, this procedure becomes very handy.
  13. Split file – reorganizes your cases by one or more variables. Selecting this will force your analysis to be separated by the split variables.
  14. Select cases – allows you to eliminate cases permanently or temporarily. We’ll go through this.
  15. Weight cases – weights cases by some variable in the dataset.
  16. Transform – this allows you make changes to existing variables and create new ones.
  17. Compute – create new variables in the dialog box; often you may want to use the paste function to write basic code that you can then edit
  18. Random number seed – set the seed for random number generation, unlikely to need to use this
  19. Creates a new variable with a value of 1 for each observation with a given value of a given string variable.
  20. Recode – allows you to change the values of a variable into new values. You can recode into a new variable or change the existing variable.
  21. Categorize Variables - Creates a new variable with x possible values based on dividing another numeric variable divided into x groups. To do a median split of your data, you would request 2 categories.
  22. Rank cases – Creates a new variable with values based on the order of another numeric variable. Can also be done within level of another variable
  23. Automatic recode – sets up a system for recoding variables
  24. Creates a new variable indicating time for time series analysis.
  25. Replace missing values – uses one several methods for replacing missing data. None of the methods provided, though, are particularly desirable or current. There are a number of other packages with better methods.

1