SPSS Cheat Sheet
Richard Blissett  Last Updated 20171114
 Data Cleaning
 Descriptive Statistics
 Bivariate Statistics
 Regression Methods
 Miscellaneous Analysis Tools
The purpose of this review is to simply list common data analysis procedures that we do in quantitative methods research and outline the SPSS pointandclick procedures to accomplish these goals. This document will be updated thoughout time. The commands here are based on SPSS Version 24. I would not recommend starting with this document if you are just beginning with SPSS. Yes, often there are multiple ways to conduct the same analysis. I only present one here for each item.
Data Cleaning
Counting missing data
 Analyse \(\rightarrow\) Descriptive Statistics \(\rightarrow\) Frequencies
 Select the variable(s)
 Click “Continue” and the “OK”
Missing data counts will be at the top of the resulting output.
Edit variable values
 Transform \(\rightarrow\) Recode into Same Variables…
 Select the variable to transform and move it into the right column.
 Click “Old and New Values…”
 Under “Old Value”, enter either a specific value you would like to replace or a set of values you would like to replace.
 Under “New Value”, enter what the replacement value should be.
 Click “Add” under “New Value”.
 Click “Continue” and then “OK”.
Create a variable
 Transform \(\rightarrow\) Compute Variable…
 Click “Type and Label…” to set the variable type, then click “Continue”.
 Enter the value for the variable. If it is a string, include the value in quotes.
 OR enter a formula for the variable based on the existing variables.
 Click “OK”.
Delete a variable
 Rightclick on the column header
 Click “Clear”.
This does not produce a syntax in the Output window. The syntax for deleting a variable is here, in case you are saving your syntax:
DELETE VARIABLES [list of variables, separated by spaces].
Drop observations based on some condition (KEEP observations meeting the opposite)
 Data \(\rightarrow\) Select Cases… \(\rightarrow\) Select “If condition is satisfied” \(\rightarrow\) If…
 Enter the condition based on which observations you would like to keep, then click “Continue”.
 Select “Delete unselected cases”.
 Click “OK”.
You can specify multiple conditions at the same time by separating them with AND or OR.
Merging datasets
 Data \(\rightarrow\) Merge Files \(\rightarrow\) Add Variables…
 Note that the datasets you are merging must already be saved as SPSS (.sav) format files. In addition, the variables you are matching on must have the same name across datasets.
 Select “An external SPSS statistics data file”, browse for your file, and select it.
 Select “Match cases on key variables”, click on the matching variable, and add it to “Key Variables”.
 Click “OK”.
Appending datasets
 Data \(\rightarrow\) Merge Files \(\rightarrow\) Add Cases…
 Note that the datasets you are merging must already be saved as SPSS (.sav) format files. In addition, the variables you are matching on must have the same name across datasets.
 Select “An external SPSS statistics data file”, browse for your file, and select it.
 All variables already in both datasets will appear in “Variables in New Active Dataset”, and variables not in both datasets will be in “Unpaired Variables”. Move all unpaired variables you want into the right column.
 Click “OK”.
Descriptive Statistics
Central tendency: mean, median, and mode (for continuous variable)
 Analyze \(\rightarrow\) Descriptive Statistics \(\rightarrow\) Frequencies
 Select the continuous variable(s)
 Uncheck “Display frequency tables”
 Click “Statistics…” and check the desired central tendency measures
 Click “Continue” and then “OK”
Central tendency: mode and frequency table (for categorical variable)
 Analyze \(\rightarrow\) Descriptive Statistics \(\rightarrow\) Frequencies
 Select the categorical variable(s)
 Check “Display frequency tables”
 Click “Format” and select “Descending counts”
 Click “Continue” and then “OK”
The top item in the frequency table is the mode. Note that if multiple categorical variables are selected, a separate frequency table will be created for each variable.
Variability: Standard deviation, variance, and range (for continuous variable)
 Analyze \(\rightarrow\) Descriptive Statistics \(\rightarrow\) Descriptives
 Select the continuous variable(s)
 Click “Options” and select the desired measures of spread
 Click “Continue” and then “OK”
Bivariate Statistics
OneSample T Test
 Analyze \(\rightarrow\) Compare Means \(\rightarrow\) OneSample T Test…
 Select the variable
 Use the “Options” menu to set the confidence interval level
 Set the population mean in “Test Value”
 Click “OK”
TwoSample Independent T Test
 Data must be organized such that the continuous variable is one variable and the categorical grouping variable is the other variable.
 Analyze \(\rightarrow\) Compare Means \(\rightarrow\) IndependentSamples T Test…
 Select the continuous variable and move it to “Test Variable(s)” selection
 Select the categorical outcome and move it to the “Grouping Variable” selection
 Click “Define Groups…”
 Enter the two values for the two groups that will be compared (e.g., 1 and 0, or “Male” and “Female”)
 Click “Continue” and then “OK”
TwoSample Dependent T Test
 Data must be organized such that the continuous variable is in two separate variables, one for each time period/half of the paired sample.
 Analyze \(\rightarrow\) Compare Means \(\rightarrow\) PairedSamples T Test…
 Select the two continuous variables and move them over to the right side – they should be under “Pair 1”
 Click “OK”
Correlation
 Analyze \(\rightarrow\) Correlate \(\rightarrow\) Bivariate
 Select all variables that you wish to correlate
 Click “OK”
Regression Methods
Ordinary least squares regression

 Analyze \(\rightarrow\) Regression \(\rightarrow\) Linear
 Move your dependent variable into the spot for “Dependent”
 Move your independent variable(s) into the spot for “Block 1 of 1”
 Click “OK”
Miscellaneous Analysis Tools
Specify the “working” dataset
Logic: When using pointandclick, SPSS will only be able to refer to one dataset as a time, even though it is possible to have multiple datasets open at a time.
You can specify which dataset you are working from using the following syntax:
DATASET ACTIVATE [dataset name]
You can figure out the name of the dataset by finding the syntax line the opened the dataset in your output window (starts with GET FILE
) and look for where it says DATASET NAME
.
Conduct analysis for subset of observations
Logic: Rather than attaching the condition to the specific command as is the case in other languages (“Do X if Y”), SPSS workflow requires you to “filter” your data, which temporarily allows you to run commands on a subset of the data. When you are done, you can restore the full set of data.
 Data \(\rightarrow\) Select Cases… \(\rightarrow\) Select “If condition is satisfied” \(\rightarrow\) If…
 Enter the condition based on which observations you would like to keep, then click “Continue”.
 Select “Filter out unselected cases”.
 Click “OK”.
When you are done with doing an analysis on your filtered subset, you can restore the full set of data using the following syntax.
USE ALL.