SPSS Cheat Sheet — Statistical Analysis, Syntax & Data Management | Dataplexa
← Back to Cheat Sheets
Sheet icon

SPSS Cheat Sheet

Data Entry · Variable Setup · Descriptives · t-Tests · ANOVA · Regression · Chi-Square · Syntax

Sheet 6 of 6 Stats & Math Intermediate Printable

SPSS Interface Overview

Core
View / WindowPurpose
Data ViewSpreadsheet — rows = cases, columns = variables
Variable ViewDefine variable properties (name, type, labels, measure)
Output ViewerResults tables, charts, and notes from every procedure
Syntax EditorWrite, save, and re-run SPSS command syntax
Chart EditorDouble-click any chart in Output to edit it
Tip: Always switch to Variable View first to set up variables correctly before entering data.

Variable View — Properties

Setup
ColumnWhat to Set
NameShort identifier, no spaces, starts with letter (e.g. age)
TypeNumeric / String / Date / Currency
Width / DecimalsDisplay width and decimal places
LabelFull descriptive name shown in output
ValuesCode map for categoricals (1=Male, 2=Female)
MissingUser-defined missing values (e.g. 99)
MeasureScale / Ordinal / Nominal
Rule: Set Measure level correctly — SPSS uses it to suggest appropriate charts and analyses.

Measurement Levels

Theory
LevelSPSS LabelExampleAllowed Stats
NominalNominalGender, Blood TypeMode, Frequencies, Chi-Square
OrdinalOrdinalLikert Scale, RankMedian, IQR, Spearman r
Interval / RatioScaleAge, Income, ScoreMean, SD, t-test, ANOVA, Pearson r
Memory Aid — NOIR
N · O · I · R
Nominal → Ordinal → Interval → Ratio (each level adds properties)

Descriptive Statistics

Analyze

Menu: Analyze → Descriptive Statistics → …

ProcedureUse WhenKey Output
FrequenciesNominal / OrdinalCount, %, Bar chart, Pie chart
DescriptivesScale (continuous)N, Mean, SD, Min, Max, Skewness
ExploreScale — normality checkStem-leaf, Boxplot, S-W & K-S tests
CrosstabsTwo categoricalsContingency table, Chi-Square, Phi/V
Syntax — Descriptives
DESCRIPTIVES VARIABLES=age score income
  /STATISTICS=MEAN STDDEV MIN MAX SKEWNESS KURTOSIS.

Frequencies & Crosstabs Syntax

Syntax
Frequencies with Bar Chart
FREQUENCIES VARIABLES=gender education
  /BARCHART PERCENT
  /ORDER=ANALYSIS.
Crosstabs with Chi-Square
CROSSTABS
  /TABLES=gender BY smoker
  /STATISTICS=CHISQ PHI
  /CELLS=COUNT ROW COLUMN EXPECTED.
Chi-Square assumption: Expected cell count ≥ 5 in all cells. Check the footnote in output.

Normality Testing

Assumptions
Explore — Normality Tests
EXAMINE VARIABLES=score
  /PLOT NORMPLOT
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /NOTOTAL.
TestBest ForInterpret
Shapiro-Wilk (S-W)n < 50p > .05 → normal
Kolmogorov-Smirnov (K-S)n ≥ 50p > .05 → normal
Skewness / KurtosisAny n±1.0 acceptable; ±2.0 borderline
Q-Q PlotVisualPoints near diagonal → normal

Independent Samples t-Test

Inference

Menu: Analyze → Compare Means → Independent-Samples T Test

Test Statistic
t = (x̄₁ − x̄₂) / SEdiff
SEdiff = √(s₁²/n₁ + s₂²/n₂)  |  df = n₁ + n₂ − 2
Syntax
T-TEST GROUPS=gender(1 2)
  /MISSING=ANALYSIS
  /VARIABLES=score
  /CRITERIA=CI(.95).
Levene's Test: Check first. If p < .05 → variances unequal → read "Equal variances not assumed" row.

Paired & One-Sample t-Test

Inference
Paired Samples t-Test Syntax
T-TEST PAIRS=pre WITH post (PAIRED)
  /CRITERIA=CI(.95)
  /MISSING=ANALYSIS.
One-Sample t-Test Syntax
T-TEST
  /TESTVAL=100
  /MISSING=ANALYSIS
  /VARIABLES=iq_score
  /CRITERIA=CI(.95).
Effect Size — Cohen's d
d = (x̄ − μ₀) / s
0.2 = small · 0.5 = medium · 0.8 = large

One-Way ANOVA

Inference

Menu: Analyze → Compare Means → One-Way ANOVA

F Statistic
F = MSbetween / MSwithin
MS = SS / df  |  SStotal = SSbetween + SSwithin
Syntax with Post Hoc
ONEWAY score BY group
  /STATISTICS DESCRIPTIVES HOMOGENEITY
  /PLOT MEANS
  /MISSING ANALYSIS
  /POSTHOC=TUKEY BONFERRONI
     ALPHA(.05).
Assumption: Levene's test for homogeneity of variance. If violated, use Welch's ANOVA or Games-Howell post hoc.

Factorial (Two-Way) ANOVA

Inference

Menu: Analyze → General Linear Model → Univariate

GLM Univariate Syntax
UNIANOVA score BY gender treatment
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /PRINT=ETASQ HOMOGENEITY DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=gender treatment gender*treatment.
SourceMeaning
genderMain effect of gender
treatmentMain effect of treatment
gender*treatmentInteraction effect
η² (Eta squared): .01 = small · .06 = medium · .14 = large effect

Simple Linear Regression

Regression

Menu: Analyze → Regression → Linear

Regression Equation
Ŷ = b₀ + b₁X
b₀ = intercept · b₁ = slope (unstandardized) · β = standardized
Syntax
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /DEPENDENT salary
  /METHOD=ENTER experience
  /SCATTERPLOT=(*ZRESID, *ZPRED)
  /RESIDUALS=DURBIN.
OutputMeaning
Proportion of variance in Y explained by X
Adj R²R² adjusted for number of predictors
F (ANOVA)Overall model significance
β (Beta)Standardized coefficient — comparable across predictors
Durbin-Watson≈ 2 = no autocorrelation; <1 or >3 = problem

Multiple Regression

Regression
Multiple Regression Equation
Ŷ = b₀ + b₁X₁ + b₂X₂ + … + bₖXₖ
k = number of predictors · VIF < 10 (no multicollinearity)
Enter Method — Multiple Predictors
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA COLLIN TOL
  /DEPENDENT salary
  /METHOD=ENTER age education experience.
MethodWhen to Use
ENTERTheory-driven — enter all predictors simultaneously
STEPWISEExploratory — auto selects predictors by F criterion
FORWARDAdds predictors one at a time (best contribution)
BACKWARDStarts full, removes least significant predictors
Multicollinearity: Check Tolerance (> 0.1) and VIF (< 10) in Coefficients table.

Correlation Analysis

Bivariate
Pearson r
r = Σ[(xᵢ−x̄)(yᵢ−ȳ)] / √[Σ(xᵢ−x̄)² · Σ(yᵢ−ȳ)²]
Range: −1 to +1 · |r|: .1=small · .3=medium · .5=large
Pearson & Spearman Syntax
/* Pearson (Scale data) */
CORRELATIONS
  /VARIABLES=age salary score
  /PRINT=TWOTAIL SIG FULL
  /MISSING=PAIRWISE.

/* Spearman (Ordinal or non-normal) */
NONPAR CORR
  /VARIABLES=rank satisfaction
  /PRINT=SPEARMAN TWOTAIL SIG
  /MISSING=PAIRWISE.
Note: Correlation ≠ Causation. Always report r and p-value together.

Chi-Square Tests

Non-Parametric
Chi-Square Statistic
χ² = Σ [(O − E)² / E]
O = observed · E = expected · df = (r−1)(c−1)
Goodness-of-Fit Syntax
NPAR TESTS
  /CHISQUARE=category
  /EXPECTED=EQUAL.  /* or specify proportions */
TestVariablesNull Hypothesis
Goodness-of-Fit1 categoricalObserved = expected distribution
Independence2 categoricalVariables are independent
Association MeasureUse When
Phi (φ)2×2 table
Cramér's VLarger tables (r×c)
LambdaAsymmetric nominal associations

Non-Parametric Alternatives

Non-Parametric
Parametric TestNon-Parametric AlternativeSPSS Procedure
Independent t-testMann-Whitney UNonparametric → Legacy → 2 Ind. Samples
Paired t-testWilcoxon Signed-RankNonparametric → Legacy → 2 Related Samples
One-Way ANOVAKruskal-Wallis HNonparametric → Legacy → K Ind. Samples
Repeated Measures ANOVAFriedman TestNonparametric → Legacy → K Related Samples
Pearson rSpearman ρNonparametric → Correlations → Spearman
Mann-Whitney U Syntax
NPAR TESTS
  /M-W=score BY group(1 2)
  /MISSING ANALYSIS.

Data Transformation

Transform
Compute New Variable
COMPUTE bmi = weight / (height * height).
EXECUTE.

/* Log transformation for skewed data */
COMPUTE log_income = LN(income).
EXECUTE.
Recode Into Different Variable
RECODE age
  (18 THRU 35=1)(36 THRU 55=2)
  (56 THRU HIGHEST=3)
  INTO age_group.
VARIABLE LABELS age_group 'Age Group'.
VALUE LABELS age_group 1 'Young'
  2 'Middle' 3 'Senior'.
EXECUTE.

Data Management Commands

Manage
Select Cases
/* Keep only females */
SELECT IF (gender = 2).
EXECUTE.

/* Reset — all cases */
FILTER OFF.
USE ALL.
EXECUTE.
Sort & Split File
SORT CASES BY department (A) salary (D).

/* Analyze by group separately */
SPLIT FILE SEPARATE BY department.
SPLIT FILE OFF.  /* Reset */
Aggregate — Mean per Group
AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=department
  /mean_salary=MEAN(salary).

Missing Data Handling

Data Quality
StrategyWhen to UseSPSS Option
Listwise deletionMCAR, small % missingMISSING=LISTWISE
Pairwise deletionCorrelation/regression, preserve nMISSING=PAIRWISE
Mean substitutionSimple continuous replacementTransform → Replace Missing
Multiple ImputationMCAR / MAR, formal analysesAnalyze → Multiple Imputation
Replace Missing with Mean
RMV score_imp=SMEAN(score).
EXECUTE.
Caution: Mean substitution reduces variance and can distort correlations. Prefer Multiple Imputation for formal research.

Reliability — Cronbach's Alpha

Scale

Menu: Analyze → Scale → Reliability Analysis

Cronbach's Alpha Formula
α = (k / k−1) · [1 − (Σσᵢ²) / σ²ₜ]
k = items · σᵢ² = item variance · σ²ₜ = total scale variance
Reliability Syntax
RELIABILITY
  /VARIABLES=q1 q2 q3 q4 q5
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA
  /STATISTICS=DESCRIPTIVE SCALE
  /SUMMARY=TOTAL.
α ValueInterpretation
≥ .90Excellent
.80 – .89Good
.70 – .79Acceptable
.60 – .69Questionable
< .60Unacceptable

Factor Analysis (EFA)

Multivariate

Menu: Analyze → Dimension Reduction → Factor

Principal Components Syntax
FACTOR
  /VARIABLES q1 q2 q3 q4 q5 q6
  /MISSING LISTWISE
  /ANALYSIS q1 q2 q3 q4 q5 q6
  /PRINT KMO EXTRACTION ROTATION
  /CRITERIA MINEIGEN(1)
  /EXTRACTION PC
  /ROTATION VARIMAX
  /SAVE REG(ALL FAC).
DiagnosticAcceptable Value
KMO≥ 0.60 (sampling adequacy)
Bartlett's Testp < .05 (correlations exist)
Communality≥ 0.40 per item
Factor Loading≥ |0.40| for inclusion
Eigenvalue Rule> 1 (Kaiser criterion)

SPSS Syntax — Essentials & Quick Reference

Syntax
File Operations
/* Open data file */
GET FILE='/data/survey.sav'.

/* Save data file */
SAVE OUTFILE='/data/clean.sav'
  /COMPRESSED.

/* Import CSV */
GET DATA
  /TYPE=TXT
  /FILE='/data/data.csv'
  /DELIMITERS=","
  /FIRSTCASE=2.  /* skip header */
Variable & Value Labels
VARIABLE LABELS
  gender 'Participant Gender'
  score  'Test Score (0–100)'.

VALUE LABELS gender
  1 'Male'
  2 'Female'
  3 'Non-binary'.

MISSING VALUES score (99)
  gender (9).
EXECUTE.
IF / DO IF Logic
/* Conditional compute */
IF (score >= 50) pass=1.
IF (score < 50)  pass=0.
EXECUTE.

DO IF (group=1).
  COMPUTE label=1.
ELSE IF (group=2).
  COMPUTE label=2.
ELSE.
  COMPUTE label=9.
END IF.
EXECUTE.
RuleDetail
Commands end with periodEvery SPSS syntax command must end with a . (full stop)
Subcommands use /Subcommands within a procedure start with /
Strings in quotesText values must be in single quotes: 'Male'
Case insensitiveKeywords can be upper or lower case — GET FILE = get file
Comments/* comment */ or start line with *
EXECUTERequired after transformation commands to force processing

Reading SPSS Output

Interpret
Table / RowWhat to Report
Model SummaryR, R², Adjusted R², Std. Error of estimate
ANOVA tableF, df₁, df₂, p-value (model significance)
Coefficientsb, SE, β, t, p, 95% CI — one row per predictor
Group Statisticsn, Mean, SD per group (t-test)
Levene's Testp > .05 → equal variances assumed
Post Hoc TestsPairwise p values — which groups differ
APA Format: t(df) = value, p = .xxx, d = value · F(df₁, df₂) = value, p = .xxx, η² = value

Selecting the Right Test

Decision
Research QuestionDV LevelUse
Compare 2 independent groupsScaleIndependent t-test
Compare 2 related measurementsScalePaired t-test
Compare 3+ independent groupsScaleOne-Way ANOVA
2 factors + interactionScaleFactorial ANOVA
Predict continuous outcomeScaleLinear Regression
Predict binary outcomeNominalLogistic Regression
Association between 2 categoricalsNominalChi-Square
Linear relationship strengthScale–ScalePearson Correlation
Rank-based relationshipOrdinalSpearman Correlation

Common SPSS Errors & Fixes

Troubleshoot
Error / IssueFix
Variable name has spacesUse underscore: test_score
String variable in numeric analysisRecode to numeric or change Type in Variable View
User-missing values included in meanDefine missing values in Variable View
Chi-Square warning: expected < 5Merge cells, use Fisher's Exact Test (2×2), or collect more data
Syntax "End of command expected"Check for missing period . at end of command
Output: "There are no valid cases"All cases filtered or selected; check SELECT IF / FILTER
Paste Syntax: In any dialog, use the Paste button instead of OK to send syntax to the editor — great for reproducibility.

SPSS Mastery Checklist

Self-Assessment

Interface & Setup

Navigate Data View and Variable View
Set Name, Type, Label, Values, Missing, and Measure for each variable
Import CSV/Excel files and save .sav files
Use the Output Viewer to interpret results
Open, write, and run commands in Syntax Editor

Data Management

Compute new variables with formulas
Recode variables (same / different variable)
Select and filter cases using SELECT IF
Sort cases and use SPLIT FILE by group
Handle missing data (listwise, pairwise, imputation)

Descriptive & Normality

Run Frequencies for categorical variables
Run Descriptives for continuous variables (mean, SD)
Use Explore to check normality (S-W, K-S, Q-Q plots)
Interpret skewness and kurtosis values
Produce Crosstabs with row/column percentages

Inferential Tests

Conduct and interpret independent samples t-test
Conduct and interpret paired samples t-test
Run One-Way ANOVA with Tukey post hoc
Run Factorial ANOVA and interpret interactions
Choose a non-parametric alternative when needed

Correlation & Regression

Compute Pearson and Spearman correlations
Interpret r, R², and p-values
Run simple and multiple linear regression
Check assumptions (normality, homoscedasticity, multicollinearity)
Report β, t, p, and 95% CI in APA format

Advanced Procedures

Run Chi-Square independence test with Cramér's V
Assess scale reliability with Cronbach's Alpha
Conduct Exploratory Factor Analysis (EFA)
Use Multiple Imputation for missing data
Write reproducible syntax and save .sps files

🎉 You've completed the Statistics & Math series!

Explore more cheat sheets — Rust, JavaScript, Power BI, Tableau, and R Language are coming next.
Browse All Cheat Sheets →
← Back