From question to analysis plan
“Did the program help?” is not one statistical question. AURORA-30 is the wholly synthetic teaching cohort and dataset used to make that conflict visible: 30 fictional records, with no real patients, institutions, interventions, or outcomes; it does not constitute clinical evidence.
The conflict: one table, three defensible routes
The same AURORA-30 columns support three plausible analyses:
- Day 30 between groups: estimate the group difference at the end of follow-up.
- Before and after in the same person: estimate within-person change from baseline.
- Change between groups: estimate the difference between the groups’ mean changes.
Each route can be mathematically correct, yet each answers a different question. The contrast, dependence structure, denominator, and interpretation change. A test name cannot decide which answer the study owes its reader.
The move: make the decisions recoverable
An analysis contract is not a legal document or an approval form. It is versioned, verifiable memory of the decisions that make the result mean what it claims: population, contrast, outcome, time, unit, effect measure, missing-data rule, and intended interpretation. It lets another analyst reconstruct the route, challenge a choice, and distinguish a documented revision from a silent rewrite.
PICO or PECO frames the question; the estimand closes it
PICO records population, intervention, comparator, and outcome. For observational questions, PECO replaces intervention with exposure. Add the time horizon, unit of analysis, effect measure, and handling of intercurrent events—post-baseline occurrences, such as treatment discontinuation or rescue treatment, that affect how the outcome should be interpreted or whether it can be observed. That last move turns a topic into a computation-ready contract.
For the first route, the teaching question becomes: among eligible synthetic participants, what is the 30-day difference in mean symptom score between program and usual-care groups, analyzed at participant level under the pre-specified missing-data rule? The effect is a mean difference with a confidence interval. The other two routes remain legitimate questions, but they are not this estimand.
why is “difference in symptom score” still incomplete?
Worked example: write the AURORA-30 contract
analysis_plan = {
"population": "eligible AURORA-30 participants",
"unit": "participant",
"exposure": "discharge_program",
"comparison": "usual_care",
"outcome": "symptom_score_day_30",
"estimand": "mean_difference",
"time_horizon_days": 30,
"analysis_set": "all_assigned_with_prespecified_missing_rule",
"evidence_bundle": ["effect", "confidence_interval", "diagnostic", "limitation"]
}
assert analysis_plan["unit"] == "participant"
assert "effect" in analysis_plan["evidence_bundle"]
The contract deliberately does not name a test. The design and estimand constrain the candidate methods; HEALTH.2–4 determine whether the data can support them. In HEALTH.5 the hypothesis becomes a secondary statement about the estimand, not the owner of the analysis.
Your turn: freeze the question before opening the data
Retrieve the primer's design-before-method decision: the question and dependence structure must constrain the method, never the other way around. Write one sentence that contains population, comparison, outcome, time, unit, and effect measure. Then answer the first six items of the universal method checklist: estimand, population/unit, outcome scale, groups/times, dependence, and sampling bias. If any answer is “unknown,” the plan requires review (HOLD)—not because the researcher or study failed, but because the question is not yet executable.
when may the data change a pre-specified plan?
what belongs beside a p-value in this course?
Decision audit: can another analyst reproduce the question?
A useful plan resolves predictable forks: analysis by assignment or observed exposure, reduction of repeated records to the participant unit, acceptable day-30 window, and the primary rule when outcomes are missing. It also separates descriptive, associational, and causal intent. PICO or PECO organizes a question; it does not eliminate selection bias, create exchangeability, or guarantee generalization. Put the intended interpretation beside the estimand so later modules cannot inflate it.
Run a handoff test. Give the contract—without the dataset—to another analyst. They should select the same population, row unit, outcome, time, contrast direction, and effect measure. If two defensible analyses remain possible, the contract is not finished. Record those forks before proceeding rather than allowing software defaults to decide them.
Version the plan. A revision made before outcome inspection differs from a change triggered by the observed effect. Preserve old and new versions, the reason, who approved it, and whether the estimand changed. HEALTH.12 will compare the final report with the version that actually governed the work. Pre-specification is not rigidity; it is visible accountability for deviations.
Name the contrast direction explicitly: program minus usual care is not interchangeable with its inverse.
Label every AURORA-30 quantity as synthetic and educational so no reader mistakes the exercise for clinical evidence.
{"population":"eligible synthetic adults","outcome":"___","time":"day 30","effect":"___"}. Turn it into one estimand sentence and predict which blank should trigger HOLD; then run the validator and compare its evidence with your commitment.analysis-plan-contract
Validate a synthetic AURORA-30 plan for a complete estimand, explicit unit, time horizon, analysis set, and evidence bundle. The lab writes the first capstone artifact: analysis_plan.json.
python analysis_plan_contract.py --input samples/aurora30_plan.json --out analysis_plan.json --format jsonanalysis_plan.json, including contrast direction and missing-data rule. HEALTH.2 will test whether the row structure and denominators can honor it; HEALTH.12 will compare the final dossier with this governing version.- Frame the question with PICO/PECO; close it with an estimand.
- The unit, time horizon, denominator, and effect measure are analytical decisions.
- A test is one link in a chain that ends with effect, interval, diagnostic, and limitation.