SPSS Data Cleaning Before Analysis: The Step Most Students Ignore

SPSS Data Cleaning Before Analysis: The Step Most Students Ignore

Spread the knowledge

Last updated on November 23rd, 2026 at 12:59 pm

Most students jump straight into SPSS analysis, but messy data produces misleading results. In my experience, many dissertation problems start before the first statistical test is even run.

Quick answer

Before analysis in SPSS, clean your data in five steps: handle missing values, detect outliers, remove duplicate records, check reverse-coded items and test for normality. Clean data gives more accurate results and fewer supervisor corrections.

Why data integrity matters

Data integrity is the foundation of data quality. If the dataset is wrong, every mean, correlation and regression built on it will be wrong too.

5 SPSS data cleaning steps

1. Handle missing values

Blank or coded answers distort means, correlations and regression. Declare missing-value codes in Variable View and decide on a strategy (deletion or imputation) that you can justify.

2. Detect outliers

A few extreme values can change the outcome significantly. Use boxplots, z-scores or Explore in SPSS to find them, then decide whether they are errors or genuine cases.

3. Remove duplicate records

Duplicate entries inflate your sample size and skew results. Use Data > Identify Duplicate Cases.

4. Check reverse coding

If negatively worded questionnaire items are not reverse-coded properly, the reliability of your scale can fall apart.

5. Test for normality

Many statistical tests assume normally distributed data. Check histograms, Q-Q plots and Shapiro-Wilk or Kolmogorov-Smirnov tests before choosing parametric tests.

Before you start: protect the raw data

  • Save an untouched copy of the original file (for example survey_raw.sav) and do all cleaning in a second file.
  • Keep a short cleaning log: what you found, how many cases it affected and what you did. Your supervisor or examiner may ask for it.
  • Where possible, use SPSS syntax (Paste instead of OK) so every change can be repeated and checked.

How to run each check in SPSS

Check for impossible or out-of-range values

Run Analyze > Descriptive Statistics > Frequencies (or Descriptives) and look at the minimum and maximum of every variable. A 7 on a 1–5 Likert item, an age of 222 or a gender code of 3 when only 1 and 2 exist are data-entry errors. Go back to the original questionnaire to correct them, or set them as missing if the true value cannot be found.

Missing values in practice

In Variable View, open the Missing column and declare codes such as 99 as missing. Then count missing values per variable and look at the pattern before choosing a method. Our guide to listwise deletion vs multiple imputation in SPSS walks through this step by step.

Finding outliers

  • Boxplots: Analyze > Descriptive Statistics > Explore, then tick Outliers under Statistics. In the boxplot, SPSS marks values more than 1.5 box-lengths from the box with a circle and more than 3 box-lengths with an asterisk, labelled with the case number.
  • z-scores: in Descriptives, tick Save standardized values as variables. Values beyond about ±3.29 are a commonly used flag for extreme cases.
  • Multivariate outliers: for regression, save Mahalanobis distances from Analyze > Regression > Linear > Save and compare them with a chi-square critical value.

Flagging an outlier is not the same as deleting it. Check whether it is an error; if it is a genuine response, keep it and consider a robust or non-parametric test, or report the analysis with and without it.

Removing duplicates

Data > Identify Duplicate Cases lets you choose the variables that define a duplicate, such as respondent ID or a combination of answers. SPSS creates an indicator variable where 1 marks the primary case and 0 marks a duplicate. Sort by it, inspect the flagged rows and delete only true repeats.

Reverse coding negatively worded items

For a 1–5 scale, the reversed score is 6 minus the original. Use Transform > Recode into Different Variables so the original item is kept, or paste syntax like this:

RECODE Q5 Q9 (1=5) (2=4) (3=3) (4=2) (5=1) INTO Q5_r Q9_r.
EXECUTE.

Then run Analyze > Scale > Reliability Analysis with Scale if item deleted ticked. A negative corrected item-total correlation is a strong sign that an item still needs reversing.

Checking normality

Use Analyze > Descriptive Statistics > Explore > Plots and tick Normality plots with tests. Look at the histogram and Q-Q plot first. Shapiro-Wilk is usually preferred for smaller samples; with large samples, both Shapiro-Wilk and Kolmogorov-Smirnov can flag deviations too small to matter, so judge the plots and skewness alongside the p-value.

Data cleaning checklist

CheckSPSS menuWhat to look forTypical fix
Out-of-range valuesFrequencies / DescriptivesMin or max outside the valid rangeCorrect from source or set as missing
Missing valuesFrequencies; Multiple Imputation > Analyze PatternsAmount and pattern of missingnessJustified deletion or multiple imputation
OutliersExplore; Descriptives (z-scores)Circles and asterisks in boxplots; |z| above about 3.29Check, keep and discuss, or use robust tests
DuplicatesData > Identify Duplicate CasesIndicator = 0Delete confirmed repeats
Reverse codingTransform > Recode; Reliability AnalysisNegative item-total correlationRecode into a new variable
NormalityExplore > Normality plots with testsSkewed histogram, curved Q-Q plotTransform, or choose a non-parametric test

Example: a simple cleaning log

Issue foundCases affectedAction taken
Age entered as 2221Corrected to 22 from the paper questionnaire
Duplicate submissions (same ID)4Second copies deleted
Q5 and Q9 negatively wordedAllRecoded into Q5_r and Q9_r
Extreme income values (|z| > 3.29)3Kept as genuine; analysis repeated without them as a check
Illustrative example, not real data.

How to report data cleaning in your methodology

Example write-up

Prior to analysis, the data were screened for entry errors, duplicates, missing values and outliers. One out-of-range age value was corrected from the original questionnaire and four duplicate submissions were removed, leaving 296 cases. Two negatively worded items were reverse-coded. Three cases had standardised income scores above 3.29; as they were genuine responses, they were retained, and the main analysis was repeated without them with no change to the conclusions.

Common data cleaning mistakes

  • Cleaning the only copy of the dataset, so the original can never be recovered.
  • Deleting every outlier automatically instead of checking whether it is an error.
  • Reverse-coding an item twice, or recoding over the original variable.
  • Forgetting to declare missing-value codes, so 99 is treated as a score.
  • Running normality tests on the whole sample when the test compares groups; check normality within each group.
  • Not mentioning any of the cleaning steps in the methodology chapter.

My advice

Treat data cleaning as quality control for your dissertation. A few extra minutes checking the dataset can save days of corrections later. Clean data leads to more accurate SPSS results, sounder conclusions and fewer supervisor comments. In research, good analysis begins with clean data. Next, avoid the 15 most common SPSS mistakes.

Check variable types and measurement levels

In Variable View, make sure each variable has the right Type (numeric or string), clear Values labels (for example 1 = Male, 2 = Female) and the correct Measure level: nominal for categories, ordinal for ranked items and scale for continuous scores. Wrong measurement levels can hide variables from some dialogs and lead to the wrong charts or tests.

Screen out careless responses

Online surveys often contain responses that were not completed carefully. Common checks include very short completion times, ā€œstraight-liningā€ (the same answer to every item, even reverse-worded ones) and failed attention-check questions. Decide your rules before looking at the results, apply them consistently and report how many cases were removed.

Compute scale scores

Once items are cleaned and reverse-coded, create a total or mean score for each scale with Transform > Compute Variable. Using a mean score with a minimum number of valid answers keeps respondents who skipped one item:

COMPUTE stress = MEAN.4(q1, q2, q3, q4_r, q5).
EXECUTE.

Here MEAN.4 calculates the mean only if at least four of the five items are answered; otherwise the score is left missing.

How Excellence Innovations can help with data cleaning

Since 2019, Excellence Innovations has supported students and researchers with analysis, writing and dissertation support, and holds a 4.9ā˜… rating on Google. Our experts can help you:

  • Check and correct coding, value labels and measurement levels.
  • Find and handle missing values, outliers and duplicates.
  • Reverse-code items, compute scale scores and check reliability.
  • Write a clear data screening section for your methodology.

We explain every step in plain language so you understand your work and can discuss it confidently with your supervisor. Send your brief on WhatsApp for a free quote, or see our SPSS and data analysis support.

Want your dataset checked before analysis?

We clean, code and prepare your SPSS data so the results hold up.

Get SPSS help

Frequently asked questions

Why is data cleaning important before SPSS analysis?

Because missing values, outliers, duplicates and coding errors distort results. Cleaning first makes your findings accurate and defensible.

How do I find duplicate cases in SPSS?

Use Data > Identify Duplicate Cases, choose the variables that define a duplicate, and SPSS will flag the repeated records.

Should I remove outliers in SPSS?

Only if they are errors or clearly outside your population. Genuine extreme values should usually be kept and discussed, or handled with robust or non-parametric methods.

How do I reverse code items in SPSS?

Use Transform > Recode into Different Variables. For a 1–5 scale, recode 1=5, 2=4, 3=3, 4=2 and 5=1 into a new variable so the original item is kept.

How do I check normality in SPSS?

Use Analyze > Descriptive Statistics > Explore, then tick Normality plots with tests under Plots. Read the histogram and Q-Q plot together with the Shapiro-Wilk result.

What z-score counts as an outlier?

A commonly used flag is a standardised score beyond about ±3.29. Treat it as a reason to check the case, not an automatic reason to delete it.

Do I need to report data cleaning in my dissertation?

Yes. Briefly state what you checked, what you found, how many cases were affected and what you did, usually in the methodology or the start of the results chapter.

What is straight-lining in survey data?

It is when a respondent gives the same answer to every item, even reverse-worded ones. It often signals careless responding and is a common data screening check.

How do I compute a scale score in SPSS?

Use Transform > Compute Variable with the MEAN or SUM function, after reverse-coding. MEAN.n lets you require a minimum number of answered items.

Author

  • Farhina Sultana, PhD Research and Academic Analytics Expert at Excellence Innovations

    Farhina is a dedicated PhD research specialist with experience in supporting scholars across different stages of doctoral research. She specialises in research planning, literature review, academic writing, research methodology, data analysis, and thesis development. Her approach combines academic precision with practical research guidance, helping scholars develop well-organised and research-focused doctoral work.

Comments are closed