Doctors Revision

SPSS for Biostatistics and Health Data Analysis

SPSS for Biostatistics and Health Data Analysis

IBM SPSS Statistics is a menu-driven and syntax-capable program used to manage, analyse and present clinical, epidemiological and public-health data. Correct variable definition, data cleaning and interpretation are more important than simply clicking statistical commands.

Learning objectives

  • Describe the SPSS interface and file structure.
  • Define variables and enter or import health data correctly.
  • Clean and transform data using reproducible procedures.
  • Perform descriptive and basic inferential analyses.
  • Interpret SPSS output and report results appropriately.

The SPSS working environment

Data View

Rows represent cases or participants and columns represent variables. Cells contain the observed values.

Variable View

Defines name, type, width, decimals, label, value labels, missing values, column display, alignment and measurement level.

Output Viewer

Displays tables, charts, warnings and analysis results. Save it separately as an output file.

Syntax Editor

Stores commands so analyses can be checked, repeated and audited.

Defining variables correctly

PropertyPurposeExample
NameShort unique identifier without spacessys_bp
TypeNumeric, string, date or other formatNumeric
LabelClear descriptionSystolic blood pressure (mmHg)
ValuesMeaning of coded categories0 = No, 1 = Yes
MissingUser-defined missing codes99 = Not recorded
MeasureNominal, ordinal or scaleScale for age

Use a unique study identifier and remove unnecessary direct identifiers. Keep a data dictionary and preserve an unchanged raw-data file.

Importing and checking data

  1. Use File → Open → Data or import an Excel/CSV file.
  2. Confirm that the first row contains variable names.
  3. Check variable types, labels and missing-value definitions.
  4. Run Frequencies for categorical variables and Descriptives or Explore for numerical variables.
  5. Inspect minimums, maximums, distributions, missingness and impossible values.
  6. Save a cleaned working copy with a new version name.

Common data-management procedures

  • Transform → Compute Variable: create BMI, totals or other derived variables.
  • Transform → Recode: group age or change category codes; prefer recoding into a different variable.
  • Data → Select Cases: analyse a defined subset without deleting records.
  • Data → Sort Cases: arrange cases by one or more variables.
  • Data → Merge Files: add cases or variables after checking unique identifiers.

Descriptive statistics

QuestionSPSS routeTypical output
How common is each category?Analyze → Descriptive Statistics → FrequenciesCounts and percentages
What is the centre and spread?Analyze → Descriptive Statistics → ExploreMean, median, SD, IQR and plots
How do two categories relate?Analyze → Descriptive Statistics → CrosstabsRow/column percentages and chi-square
What is the data distribution?Graphs → Chart BuilderHistogram, box plot or bar chart

Choosing inferential procedures

  • Independent-samples t-test: compare the means of two independent groups.
  • Paired-samples t-test: compare two related measurements.
  • One-way ANOVA: compare means across three or more independent groups.
  • Chi-square test: assess association between categorical variables.
  • Correlation: measure the direction and strength of association between numerical variables.
  • Linear regression: model a continuous outcome.
  • Binary logistic regression: model a binary outcome and report odds ratios.
  • Non-parametric tests: use appropriate rank-based methods when their conditions fit the question and data.

Worked interpretation

Suppose an independent t-test comparing mean haemoglobin between two groups gives a mean difference of 1.2 g/dL, 95% CI 0.4–2.0 and p = 0.004. Because p < 0.05 and the interval excludes 0, the groups differ statistically. The estimated difference is 1.2 g/dL; clinical relevance must be judged using context, study quality and potential bias.

Chi-square output

Check expected cell counts before interpreting Pearson’s chi-square. Report χ², degrees of freedom, p-value and relevant percentages.

Regression output

Report coefficients or odds ratios with 95% confidence intervals and p-values, while assessing assumptions, confounding and model fit.

Using syntax for reproducibility

FREQUENCIES VARIABLES=sex outcome.
DESCRIPTIVES VARIABLES=age systolic_bp
  /STATISTICS=MEAN STDDEV MIN MAX.
CROSSTABS
  /TABLES=exposure BY outcome
  /STATISTICS=CHISQ RISK
  /CELLS=COUNT ROW.
T-TEST GROUPS=treatment(0 1)
  /VARIABLES=systolic_bp
  /CRITERIA=CI(.95).

Use the Paste button in dialogue boxes to send commands to the Syntax Editor before running them. Add comments, keep a dated syntax file and save the output so the analysis can be reproduced.

Assumptions and quality checks

  • Match the test to the study design and variable measurement level.
  • Check independence, distributional assumptions, outliers and variance requirements.
  • Verify coding and reference categories before modelling.
  • Distinguish user-missing codes from genuine numerical values.
  • Do not repeatedly test variables until a significant p-value appears.
  • Report effect sizes and confidence intervals, not p-values alone.
Exam tip: explain the pathway from research question → variable definition → data cleaning → choice of test → assumption checking → output interpretation → reporting.

Review questions

  1. Differentiate Data View from Variable View.
  2. Which SPSS procedure assesses association between two categorical variables?
  3. Why should recoding usually create a new variable?
  4. How would you report a logistic-regression odds ratio?
  5. Why is syntax important for research quality?

Return to the Clinical Medicine Year 2 curriculum

References

  • IBM Documentation. SPSS Statistics.
  • World Health Organization. Basic Epidemiology.
  • CDC. Principles of Epidemiology in Public Health Practice.

Educational content only. Analysis of identifiable patient information must follow ethical approval, data-protection law and institutional policy.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top