Start with the study design, one-row meaning, variable roles and a short set of checks that must pass before analysis.
01
Outcome: a labelled, checked dataset with its observational design and missing values made explicit.
Seven-step investigationNow: 01 · Meet the cohort
Analysis checkpoint
Check the study and file before calculating anything.
Work through these six prompts in order. Each one supplies what the next one needs.
1 · Before you start
Have the common CSV and your chosen syntax file open. No statistical result is needed yet; this page establishes what each row and variable represents.
Words used on this page
Participant identifier
a code that should identify one person once.
Baseline
the starting point, before later outcomes are observed.
Missing value
information that was not recorded; it is not zero.
2 · Why this comes now
Every later table assumes that one row is one participant, medication review was recorded at baseline and the outcomes came afterwards. Checking that structure now prevents confident analysis of the wrong data.
3 · Do this now
Import the common CSV and confirm that it contains 720 rows and 16 variables.
Check that participant_id is unique, codes and ranges are plausible, and missing outcomes remain missing.
Label the variables and save a readable audit trail in syntax and output.
Same step in Stata and SPSS
Run Section 01 in the Stata do-file or highlight and run Section 01 in the SPSS syntax file. Both routes should confirm the same row count, identifier check, value ranges and missingness.
4 · Read this
Read the dataset dimensions, unique-identifier check and missing-value summary. These are pass/fail checks, not evidence about medication review.
5 · Ready to continue when
You can explain one row, name the baseline exposure and later outcomes, and there are no unexplained duplicate identifiers, codes or ranges.
Each row is one synthetic participant aged 65–96. Baseline
measurements include age, sex, living arrangement, deprivation,
medication count, polypharmacy, frailty and disability. The exposure is
a structured medication review. Outcomes are measured over six months.
Exposure
Medication review
med_review: 0 = no review; 1 = structured review.
Baseline risk
Frailty and disability
These help explain why some people were more likely to receive a review and to have poor outcomes.
Outcomes
Five measurement types
Continuous quality of life, binary disability, ordered frailty, falls count and time to admission.
Design
Observational cohort
The review was not randomised. Association is not automatically a treatment effect.
First checks
Import, label, audit.
Before a table or model, confirm that the file contains 720 rows,
one unique identifier per row, expected ranges and visible missingness.
The teaching file has 16 missing EQ-5D-style scores, 15 missing frailty
categories, 10 missing falls counts and 8 missing disability outcomes.
Representative output · same teaching data in all three routes
Cohort audit
Study design observational cohort
Rows / participants 720
Variables 16
Unique participant_id yes
Eligible age range 65 to 96 years
Missing eq5d_6m 16
Missing disability_6m 8
Missing frailty_cat_6m 15
Missing falls_count_6m 10
What the output means
The file has one row for each of 720 eligible participants and no duplicate identifier. The four incomplete outcomes will produce different analysis denominators later. Passing this audit shows that the file matches the planned structure; it does not prove that every recorded value is clinically correct.
Write the interpretation like this
The analysis dataset contained 720 participants aged 65–96 years, with one record per participant. Outcome data were missing for 8 disability, 16 quality-of-life, 15 frailty-category and 10 falls observations.
Stata
Import the CSV, add value labels, then make the identifier and ranges fail loudly if they are wrong.
The supplied full syntax defines every field explicitly, then labels the codes and checks the unique identifier.
GET DATA
/TYPE=TXT
/FILE='gerostats_medication_review_cohort.csv'
/ARRANGEMENT=DELIMITED
/FIRSTCASE=2
/DELIMITERS=","
/VARIABLES=
participant_id A7
age_years F3.0
/* Remaining variables are defined in the download */.
VALUE LABELS med_review disability_6m 0 "No" 1 "Yes".
DISPLAY DICTIONARY.
FREQUENCIES VARIABLES=participant_id age_years med_review.