Module 02 Activity
Scenario
A dataset has arrived for a comparison. Establish what one row is and whether the table can support the test at all.
What you build
An analysis table with a stated grain, declared factor levels and a passing check list.
Steps
- Write down the outcome, the predictor, any grouping, the unit of analysis and the time window before touching the data.
- Classify every variable — numeric, categorical, ordinal, count, rate, binary — and note which tests each admits.
- Count missing values by group. Report whether missingness is balanced, and state what complete-case analysis assumes.
- Count distinct units alongside rows. If units repeat, aggregate to one row per unit before testing.
- Convert grouping variables to factors and set the reference to the meaningful baseline with
relevel(). - Run the six-check list and treat every failure as a question for the data owner.
Evidence to hand in
- The five decisions, written before the analysis.
- The variable classification.
- The missingness table by group.
- Rows versus distinct units, and any aggregation you did.
- The declared factor levels and reference.
- The check-list results, with what each failure led to.
Review checklist
- The unit of analysis is stated and the table's grain matches it.
- Missingness is counted by group and its balance reported.
- Repeated measurements are aggregated, or the dependence is addressed.
- Every grouping variable is a factor with a deliberately set reference.
- No failed check was silently relaxed.
