RMResearch Metrics AfricaTransparent methods library

DEMONSTRATION CASE USING SYNTHETIC DATA · SYNTHETIC CASE STUDY · SPSS

The important work happened
before the first p-value.

A transparent example of turning a messy satisfaction survey into a labelled, auditable SPSS-ready dataset without hiding exclusions or manufacturing complete records.

THE MANAGEMENT QUESTION

Which service experiences are associated with overall satisfaction, and is the dataset trustworthy enough to support that comparison?

ISSUE REGISTER

Every change needs a reason.

The working file was derived from an untouched raw copy. Original values, rule, decision and reviewer status were retained in the cleaning log.

01

Duplicate response IDs

6

Compared timestamps and source fields; retained one authorised record per confirmed duplicate pair.

02

Invalid age codes

9

Checked the codebook; 999 represented missing and was recoded to system-missing—not treated as age 999.

03

Broken skip logic

14

Set downstream responses to not applicable only where the parent answer proved the question was not asked.

04

Inconsistent scale direction

2 variables

Reverse-scored the specified items before calculating the scale; preserved original fields.

SPSS WORKFLOW

A file another analyst can reopen.

Cleaning was expressed as reviewable transformations, not a trail of invisible spreadsheet edits.

01

Dictionary

Variable names, labels, types, measurement levels, value labels and user-missing codes were checked against the instrument.

02

Syntax

RECODE and COMPUTE steps preserved original fields, created derived variables and documented reverse-scored scale items.

03

Quality

FREQUENCIES, DESCRIPTIVES and CROSSTABS exposed invalid codes, sparse cells, unusual ranges and missingness patterns.

04

Gate

Reliability, group sizes, outcome distribution and test assumptions were checked before comparative analysis was released.

INSPECTABLE SPSS SYNTAX

Cleaning decisions can be rerun.

The downloadable syntax preserves the imported fields, recodes the documented age-missing value, reverse-scores the specified item and derives a scale only when enough items are observed.

Download the complete .sps syntax
COMPUTE age_years = age_code.
IF age_code = 999 age_years = $SYSMIS.
COMPUTE experience_q2_scored = 6 - experience_q2_reverse.
COMPUTE experience_scale = MEAN.3(
  experience_q1, experience_q2_scored,
  experience_q3, experience_q4
).
EXECUTE.

ILLUSTRATIVE OUTPUT

Descriptive context stays beside the test.

Synthetic results demonstrate reporting structure; they are not claims about a real service or population.

320analysis-ready rows

Six confirmed duplicate rows excluded with a documented rule.

3.8 / 5median satisfaction

Interquartile range: 3.2–4.4; distribution shown before modelling.

0.82illustrative scale α

Internal consistency for the specified four-item experience scale.

14valid skip corrections

Kept distinct from refused, unknown and genuinely missing responses.

ANALYSIS GATE

The initial chi-square table contained sparse expected counts, so categories were not merged merely to obtain significance. The report retained descriptive counts and used an exact or design-appropriate alternative only where the research question and category meaning allowed it.

HANDOVER PACKAGE

The deliverable is more than an .sav file.

RAWReference copy

Untouched source with import date and scope.

WORKApproved dataset

Labels, types and derived fields ready for analysis.

LOGCleaning decisions

Record, field, original value, rule and outcome.

SPSSPSS syntax

Re-runnable cleaning and analysis commands.

HAVE A MESSY SURVEY EXPORT?

Start with an audit—not an assumption.

Share a de-identified codebook or structural sample first. We will identify the cleaning risk and scope the smallest responsible next step.

Explore the Data Rescue Pack ↗