Learning how to clean nursing research data in SPSS before analysis protects your dissertation from avoidable coding errors, misleading statistics and conclusions based on the wrong cases. Data cleaning is the structured process of checking whether the dataset accurately represents the questionnaire, clinical audit form or other approved data-collection tool before any hypothesis test is run.

This guide takes nursing students through a focused SPSS cleaning workflow. It covers preserving the raw file, checking variable properties, finding impossible values, reviewing frequencies, identifying duplicate cases, inspecting outliers and documenting every correction. It does not replace a full missing-data strategy or explain how to select and run statistical tests.

Quick SPSS data-cleaning checklist

  • Keep the original dataset unchanged and work on a dated copy.
  • Compare every SPSS variable with the questionnaire or codebook.
  • Check names, types, labels, value labels, measurement levels and valid ranges.
  • Run frequency tables to expose unexpected category codes.
  • Investigate duplicate participant IDs and possible duplicate records.
  • Use descriptive statistics, histograms and boxplots to flag unusual values.
  • Check cross-variable logic and questionnaire skip patterns.
  • Correct only errors supported by evidence and record every change.
  • Save syntax, a cleaning log and a final analysis-ready file.

Why data cleaning matters in nursing research

Nursing datasets often contain information entered from questionnaires, patient records, observation tools or audit forms. A simple entry error can change the meaning of a variable. For example, pain scores may be valid only from 0 to 10, yet a mistyped value of 77 could inflate the mean and standard deviation. Likewise, entering “22” instead of “2” for a two-category treatment group could exclude that case from the intended comparison.

Cleaning is not an attempt to make the results statistically significant. Its purpose is to distinguish credible observations from transcription, coding and import problems. The original source, codebook and study protocol should guide each decision. A value that looks unusual is not automatically wrong; it may represent a clinically important participant.

The UK Data Service describes duplication, outliers, missingness and metadata problems as common numeric-data quality issues. IBM SPSS also provides procedures for validating ranges and identifying duplicate cases. Therefore, cleaning should be completed before moving to the wider SPSS data-analysis workflow for a nursing dissertation.

Step 1: preserve the untouched raw nursing dataset

Never clean the only copy of your data. Save the imported or entered dataset as a read-only master file, for example pain_study_raw_2026-08-26.sav. Then create a working copy such as pain_study_cleaning_v01.sav. This separation allows you to trace mistakes, repeat checks and demonstrate that the final dataset did not appear without an auditable process.

Create a short cleaning log at the same time. Record the date, case ID, variable, original value, new value, evidence and reason for each amendment. If a value cannot be verified, do not silently replace it. Flag it for review and explain the decision in the log.

Date Case ID Variable Issue Action and evidence
26 Aug 2026 N014 pain_pre Value 77 outside 0–10 range Checked source form: corrected to 7
26 Aug 2026 N031 ward Code 4 undefined Source form unclear: retained as flagged pending verification

For repeatability, use SPSS syntax whenever practical. A syntax file shows which checks and transformations were performed and can be rerun if the dataset changes. Menu actions are useful for beginners, but a written record remains essential.

Step 2: compare Variable View with the codebook

Open Variable View and compare the dataset column by column with the questionnaire and codebook. Start with the variable name. Use short, meaningful names without spaces, such as age_years, pain_pre and group. Confirm that each column represents one variable and each row in Data View represents one participant or observation.

Check variable type, labels and decimals

Numeric responses should normally be stored as numeric variables. Accidental string variables can prevent calculations. Add clear variable labels so that abbreviated names remain understandable. For whole-number variables such as age or Likert responses, unnecessary decimal places can make output difficult to read, although changing the display decimals does not alter the stored value.

Check value labels and measurement level

Category codes must match the codebook exactly. If group uses 1 = intervention and 2 = control, confirm both labels and ensure no other code appears. Set nominal, ordinal or scale measurement levels appropriately. This setting does not repair the data by itself, but it helps users interpret variables and reduces later test-selection mistakes.

Variable Expected definition Typical cleaning question
participant_id Unique identifier Is every ID present and unique?
age_years 18–90 years under the protocol Are values outside the eligibility range errors?
group 1 = intervention; 2 = control Do undefined codes such as 0 or 3 appear?
pain_pre Numeric score from 0–10 Are negative or two-digit values present?
satisfaction Ordinal response from 1–5 Are labels in the correct direction?

Step 3: find impossible values with SPSS frequencies

Frequency tables are among the fastest ways to detect invalid category codes. In SPSS, choose Analyze → Descriptive Statistics → Frequencies, move relevant categorical or bounded variables into the analysis box, and request frequency tables. Review the value column and count for every variable.

Suppose a medication-adherence item should contain only 1, 2, 3 or 4. A frequency table that displays 14 or 44 immediately signals a possible data-entry error. However, you still need to check the source document before changing it. Do not assume the intended value simply because one correction seems obvious.

FREQUENCIES VARIABLES=group satisfaction pain_pre
  /ORDER=ANALYSIS.

For continuous variables, use Analyze → Descriptive Statistics → Descriptives to inspect the minimum, maximum, mean and standard deviation. A minimum age of 3 in an adult study or a maximum temperature of 370°C deserves investigation. Range checks should always come from the protocol or instrument, not arbitrary limits invented after seeing the results.

Step 4: identify coding and labelling errors

Coding errors may be syntactically valid but conceptually wrong. For example, all observed values may fall between 1 and 5, yet the value labels may have been reversed. If the questionnaire defines 1 as “strongly disagree” and 5 as “strongly agree,” SPSS must use the same direction. A reversed label could produce a believable table with the opposite interpretation.

Compare SPSS against the original instrument and check:

  • whether response codes match the printed or online questionnaire;
  • whether negatively worded items require reverse scoring;
  • whether “not applicable,” refusal and legitimate zero values have distinct codes;
  • whether imported dates, decimal separators or text categories were interpreted correctly; and
  • whether derived variables use the planned formula.

Reverse scoring and composite-scale construction should be completed only when the instrument instructions justify them. Students working with multi-item responses can consult the separate guide to analysing nursing Likert-scale data in SPSS.

Step 5: check for duplicate cases in SPSS

A duplicate case is not simply a row that looks similar. The key question is whether two rows represent the same participant or encounter when only one record should exist. Start with a participant ID or another approved unique identifier. In SPSS, choose Data → Identify Duplicate Cases, define the matching variable or variables, and request an indicator that distinguishes primary from duplicate cases.

IBM explains that cases are treated as duplicates when their values match on the selected variables. Therefore, selecting the correct key is critical. Two different participants may share the same age, ward and response pattern. Conversely, repeated-measures data may correctly contain several rows for one participant if each row represents a different time point.

When duplicates are flagged:

  1. compare all relevant fields;
  2. check study identifiers, dates and source records;
  3. decide whether the row is a true duplicate, a legitimate repeat observation or an ID error;
  4. document the decision; and
  5. exclude or correct a record only when evidence supports the action.

Never click “delete duplicate” merely because SPSS has flagged a match. The software detects patterns; the research design determines whether they are errors.

Step 6: inspect outliers without automatically deleting them

An outlier is an observation that appears unusually distant from the rest of the distribution. It may arise from incorrect entry, instrument failure, a measurement-unit problem or a genuine clinical observation. Nursing research often includes heterogeneous patients, so an extreme value can be substantively important.

Use descriptives, histograms and boxplots

Begin with minimum and maximum values. Then choose Analyze → Descriptive Statistics → Explore and request plots. Histograms show the distribution, while boxplots flag values beyond the whiskers. SPSS may label potential outliers using case numbers, which helps you return to the relevant row.

A boxplot flag is an invitation to investigate, not permission to remove. Check the source record, units, eligibility criteria, related variables and clinical plausibility. A systolic blood pressure of 240 mmHg is extreme but possible; 2,400 mmHg is more likely a misplaced zero. Any exclusion must be justified before examining whether it improves the desired result.

Keep an outlier decision trail

Record whether each flagged value was corrected, retained, transformed or excluded and why. If legitimate outliers materially affect the analysis, report an appropriate sensitivity analysis or robust/non-parametric approach later. That decision belongs to the analysis plan rather than the basic cleaning stage.

Step 7: run logical consistency checks

Some errors are visible only when two or more variables are compared. A participant recorded as “not admitted” should not normally have a length-of-stay value. A respondent routed past a questionnaire section should not have ordinary answers to every item in that section. Likewise, a discharge date should not precede an admission date.

Use Data → Select Cases, Data → Sort Cases or temporary computed flags to identify contradictions. For example:

COMPUTE flag_date_error = (discharge_date < admission_date).
COMPUTE flag_route_error = (smoker = 0 AND cigarettes_day > 0).
FREQUENCIES VARIABLES=flag_date_error flag_route_error.

These commands create review flags; they do not correct the observations. Check each flagged case against the data-collection tool and protocol. Keep the original variables intact and record justified corrections.

Step 8: separate cleaning from missing-data analysis

During cleaning, confirm that missing values are represented consistently and are not confused with valid scores. For example, 0 may mean “no pain,” while 99 may represent an unanswered item. Defining 0 as missing would erase genuine clinical information.

At this stage, identify undocumented blanks, inconsistent special codes and impossible entries. Decisions about complete-case analysis, multiple imputation or other missing-data methods require assessment of the amount, pattern and likely mechanism of missingness. Those decisions are covered in the dedicated guide to missing data in nursing research using SPSS.

Step 9: save an analysis-ready file and cleaning evidence

After resolving supported corrections, rerun the same range, frequency, duplicate, outlier and logic checks. Save the verified dataset under a new name, such as pain_study_clean_v03_2026-08-26.sav. Keep the raw file, cleaned file, syntax, output and cleaning log together in an organised research folder.

Your methods section should briefly state how data quality was assessed. The results chapter should not list every corrected cell, but material exclusions and departures from the protocol must be transparent. When ready to present statistical findings, use the guide on how to discuss SPSS results in a nursing dissertation.

Common SPSS data-cleaning mistakes

  • Overwriting the raw file: this removes the audit trail and makes recovery difficult.
  • Deleting every outlier: unusual does not mean erroneous.
  • Guessing corrections: amend values only when the source or protocol provides evidence.
  • Using one rule for every variable: valid ranges depend on the instrument and population.
  • Confusing zero with missing: a legitimate clinical zero must remain analysable.
  • Ignoring labels: correctly typed numbers can still have reversed meanings.
  • Treating repeated observations as duplicates: first confirm the unit of analysis.
  • Cleaning after testing hypotheses: decisions influenced by preferred results increase bias.
  • Failing to record changes: undocumented edits cannot be defended or reproduced.

Worked nursing example

Imagine a nursing student analysing pain scores for 120 adults before and after a non-pharmacological intervention. The protocol permits scores from 0 to 10 and assigns each participant one unique ID. Frequencies show a pre-intervention score of 55. The student checks the source form and confirms that the intended entry was 5, records the amendment, and reruns frequencies.

The duplicate procedure then flags ID N082 twice. Dates reveal that the rows represent the same questionnaire entered on two occasions, so the second entry is excluded with the reason recorded. A boxplot flags a post-intervention score of 10. Because the source form confirms 10 and it falls within the scale, the student retains it as a valid extreme response.

This example shows the central principle: SPSS flags possible problems, but evidence determines the action. Cleaning should improve accuracy without erasing genuine nursing variation.

Frequently asked questions

Should I clean data before running descriptive statistics?

Use preliminary frequencies and descriptives as cleaning tools, but complete and document the cleaning process before producing the final descriptive and inferential results.

Can SPSS automatically clean nursing data?

SPSS can identify duplicates, rule violations and unusual distributions. However, it cannot determine whether a clinically unusual observation is true. Human review against the protocol, codebook and source record remains necessary.

Should I delete an SPSS outlier?

No, not automatically. Verify the observation, consider clinical plausibility and follow a pre-specified analysis plan. Retain genuine values unless a defensible methodological reason supports another action.

What should a nursing data-cleaning log contain?

Record the date, case ID, variable, original value, detected issue, action, evidence, reason and person making the change. Never place participant names or unnecessary identifiers in the log.

Does data cleaning include statistical testing?

No. Cleaning prepares accurate and documented data for analysis. Statistical test selection, assumption testing and hypothesis testing follow after the dataset is analysis-ready.

Conclusion

To clean nursing research data in SPSS before analysis, preserve the raw file, verify Variable View, run frequencies and range checks, investigate duplicates, inspect outliers and test logical consistency. Correct only evidence-supported errors, document each decision and rerun the checks. A transparent cleaning trail strengthens the reliability, reproducibility and academic credibility of the nursing dissertation.

References

IBM (2026) Identifying duplicate cases. IBM SPSS Statistics documentation. Available at: https://www.ibm.com/docs/en/spss-statistics/30.0.0?topic=preparation-identifying-duplicate-cases (Accessed: 26 August 2026).

IBM (2026) Performing basic checks. IBM SPSS Statistics documentation. Available at: https://www.ibm.com/docs/en/spss-statistics/32.0.0?topic=database-performing-basic-checks (Accessed: 26 August 2026).

UK Data Service (n.d.) QAMyData. Available at: https://ukdataservice.ac.uk/about/research-and-development/past-projects/qamydata/ (Accessed: 26 August 2026).

Need help checking coding, output or analysis decisions? Explore our SPSS data analysis support for nursing research.