SPSS cheat sheet
Block 1
Define variables in variable view:
type: numerical or String (text as value)
label: description of variable
values: click on dots and add (also add missing values! 9 = ”unknown”)
missing: click on dots -> discrete missing values -> type up to three codes (9, 99, 999...)
(careful: sometimes SPSS reads either over commas or dots, meaning if you have the value 9.99 and the settings
only read it if you write it with a comma, so 9,99, you have to make sure that you write it the proper way so that
the variable is recognized, and not written as 999 => ALWAYS DOUBLE CHECK!)
Sort cases: DATA → SORT CASES → can be seen in the data view -or- Right click on collumn -> SORT
ASCENDING/DESCENDING
Return to original order: sort by Respondent Number/ID
Create Bar Chart/Histogram: GRAPHS → LEGACY DIALOGS → BAR CHART/HISTOGRAM: select variable (or via chart
builder) + if you want a curve: tick “Display normal curve”
Graphs with selection:
1. First you have to make a selection: DATA → SELECT CASES → IF CONDITION IS SATISFIED: specify criteria (e.g. V6 = 1
=> sex is female or V7 < 1,60 => height is lower than 1,60) => SPSS crosses out variables that are not selected
2. Then just create a graph normally (it’s automatically created only with selected cases)
Undo selection: DATA → SELECT CASES → ALL CASES or RESET
Frequency table: ANALYZE → DESCRIPTIVE STATISTICS → FREQUENCIES: Statistics → select stuff like mean, standard
deviation, maximum, etc.
Descriptive Table: ANALYZE → DESCRIPTIVE STATISTICS → DESCRIPTIVES: Options → select stuff like mean, standard
deviation, maximum, etc.
Create Boxplot (one single variable): GRAPHS -> CHART BUILDER -> select “1-D Boxplot” -> Drag & drop variable on X
axis -> OK
-or- via LEGACY DIALOGS -> BOXPLOT -> tick “Summaries of separate variables” -> Select variable -> OK
Change color of boxplot: double click on boxplot in the output & edit color
Create side-by-side Boxplots: GRAPHS -> CHART BUILDER -> select “1-D Boxplot” -> Drag & drop variable on X axis (e.g.
Total Optimism) & Y axis (Categories we have – e.g. males/females)
Calculate z scores: ANALYZE -> DESCRIPTIVE STATISTICS -> DESCRIPTIVES -> tick “Save standardized values as variables”
=> there’s a new column of the standardized values at the end
Create scatter plot: LEGACY DIALOGS -> SCATTERPLOT -> SIMPLE SCATTER -> select variables on X axis & Y axis
-if you want to have the dots marked on the basis of another variable (e.g. gender)- Add variable in “Set markers by”
Calculate Pearson r: ANALYZE -> CORRELATE -> BIVARIATE
Block 1
Define variables in variable view:
type: numerical or String (text as value)
label: description of variable
values: click on dots and add (also add missing values! 9 = ”unknown”)
missing: click on dots -> discrete missing values -> type up to three codes (9, 99, 999...)
(careful: sometimes SPSS reads either over commas or dots, meaning if you have the value 9.99 and the settings
only read it if you write it with a comma, so 9,99, you have to make sure that you write it the proper way so that
the variable is recognized, and not written as 999 => ALWAYS DOUBLE CHECK!)
Sort cases: DATA → SORT CASES → can be seen in the data view -or- Right click on collumn -> SORT
ASCENDING/DESCENDING
Return to original order: sort by Respondent Number/ID
Create Bar Chart/Histogram: GRAPHS → LEGACY DIALOGS → BAR CHART/HISTOGRAM: select variable (or via chart
builder) + if you want a curve: tick “Display normal curve”
Graphs with selection:
1. First you have to make a selection: DATA → SELECT CASES → IF CONDITION IS SATISFIED: specify criteria (e.g. V6 = 1
=> sex is female or V7 < 1,60 => height is lower than 1,60) => SPSS crosses out variables that are not selected
2. Then just create a graph normally (it’s automatically created only with selected cases)
Undo selection: DATA → SELECT CASES → ALL CASES or RESET
Frequency table: ANALYZE → DESCRIPTIVE STATISTICS → FREQUENCIES: Statistics → select stuff like mean, standard
deviation, maximum, etc.
Descriptive Table: ANALYZE → DESCRIPTIVE STATISTICS → DESCRIPTIVES: Options → select stuff like mean, standard
deviation, maximum, etc.
Create Boxplot (one single variable): GRAPHS -> CHART BUILDER -> select “1-D Boxplot” -> Drag & drop variable on X
axis -> OK
-or- via LEGACY DIALOGS -> BOXPLOT -> tick “Summaries of separate variables” -> Select variable -> OK
Change color of boxplot: double click on boxplot in the output & edit color
Create side-by-side Boxplots: GRAPHS -> CHART BUILDER -> select “1-D Boxplot” -> Drag & drop variable on X axis (e.g.
Total Optimism) & Y axis (Categories we have – e.g. males/females)
Calculate z scores: ANALYZE -> DESCRIPTIVE STATISTICS -> DESCRIPTIVES -> tick “Save standardized values as variables”
=> there’s a new column of the standardized values at the end
Create scatter plot: LEGACY DIALOGS -> SCATTERPLOT -> SIMPLE SCATTER -> select variables on X axis & Y axis
-if you want to have the dots marked on the basis of another variable (e.g. gender)- Add variable in “Set markers by”
Calculate Pearson r: ANALYZE -> CORRELATE -> BIVARIATE