Unit 7 · Prepare your data
How to handle missing values and outliers in SPSS
Define missing value codes in SPSS, find outliers with z-scores (±3.29), and choose listwise or pairwise exclusion.
Quick answer: How do you handle missing values and outliers in SPSS?
- In Variable View, click the Missing cell and enter codes such as 99 as discrete missing values.
- Run Analyze › Descriptive Statistics › Descriptives with Save standardized values as variables ticked.
- Look for z-scores beyond ±3.29.
- Check each extreme value for typos before deciding what to do.
Missing data and outliers
Missing data are values that weren’t recorded. Outliers are values far from the rest. Both can distort results, so you need to find them, understand why they happened and decide what to do, then report your decisions.
When to use it
- After data entry and before any analysis.
- Whenever a summary looks odd, such as an impossible maximum.
How it works
Declare codes such as 99 as missing in Variable View so they aren’t treated as real values. Then think about why data are missing: completely at random, at random (related to other measured variables) or not at random (related to the missing value itself). For outliers, a z-score shows how many SDs a value is from the mean; |z| > 3.29 (p < .001) is a common cut-off. First check for typing errors. For genuine values, options include keeping them, removing them, or replacing them with a less extreme value (winsorising); report what you did and whether it changed the results.
Worked example
A reaction time of 828 ms has z = 3.62. It isn’t a typo, so the analysis is run with and without it, and both are reported.
Key terms
- System-missing
- A blank cell.
- User-missing
- A code (such as 99) declared as missing.
- Listwise deletion
- Dropping a case from the whole analysis if it’s missing any variable.
- Pairwise deletion
- Using every case that has data for each pair of variables.
- Winsorising
- Replacing extreme values with less extreme ones.
Common mistakes
- Leaving 99 as a real value.
- Deleting outliers just because they make results non-significant.
- Not reporting how much data was missing or excluded.
How to do it in SPSS
The SPSS syntax
Prefer typing to clicking? Open File › New › Syntax, paste this in, select it and choose Run › Selection. Every dialog's Paste button writes the same kind of code.
* Treat 99 and 999 as missing.
MISSING VALUES age (99, 999).
* Save z-scores (adds Zrt to the data).
DESCRIPTIVES VARIABLES=rt
/SAVE.Practice data
Download the file used in this lesson and run it yourself in SPSS: you should get the same results as the screens above.
- rt_study.savReaction times, with 99 and 999 codes for missing age (N = 60)
Now practise it interactively →
Reading is only half of it. Tap through the real SPSS menus, read the output and pick the right write-up in 7 quick questions, with instant feedback on every answer.
Practice for this lesson is part of Pro, with every unit, unlimited hearts and saved progress.