← All posts

Causal Inference in RCTs: ITT, CACE, and Estimands in Practice

Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or StatisticsStata [Data Analytics]Methodology and Research DesignTherapeutic [Methodology]

Causal Inference inside an RCT – STATA-First Edition

0 Glossary of Key Abbreviations

Short-formStands forMeaning in this document
RRandomised assignmentThe arm a participant is assigned to by the randomisation algorithm (sometimes noted Z).
DDelivered (received) treatmentWhat the participant actually gets; equals R only if compliance is perfect.
ACEAverage Causal EffectGeneric label for “true” causal effect; equals ATE/ATT/ATU when R = D for everyone.
ATEAverage Treatment EffectMean effect in the entire target population.
ATT / ATUEffect on the Treated / UntreatedMean effect restricted to those who did / did not receive treatment.
ITTIntention-to-TreatPrimary estimator that compares arms exactly as randomised, ignoring crossover.
PP / ATPer-Protocol / As-TreatedAnalyses restricted by compliance (PP) or re-labelled by actual D (AT); lose randomisation protection.
CACEComplier Average Causal Effect (also called LATE)The causal effect among participants who would comply with their assignment, estimated with an IV approach when R ≠ D.


1 Why an RCT Usually Satisfies the Four Causal Assumptions

  1. Exchangeability – Randomisation balances both measured & unmeasured baseline risk.
  2. Positivity – By design, every participant has a non-zero chance of landing in each arm.
  3. No-Interference (part of SUTVA) – Each patient’s assignment rarely affects another’s outcome; use cluster randomisation if it might.
  4. Consistency (second part of SUTVA) – The protocol specifies one clear version of each arm; monitor adherence to keep it that way.

Result ➜ The standard ITT contrast is already a causal estimator.


2 Perfect Compliance ⇒ All Average Effects Collapse

If every subject receives exactly what they were assigned (R = D):

ACE  =  ATE  =  ATT  =  ATU

So you only need to report the ITT contrast.


3 Continuous Outcomes – ATE via Mean Difference

3·1 Crude ITT

* assume variable treat = 1 treatment arm, 0 control
ttest outcome, by(treat)          // mean difference + CI

3·2 Precision-boosted ITT (ANCOVA)

regress outcome i.treat baseline_outcome age sex
margins, dydx(treat)               // adjusted mean diff = ATE

Adding baseline prognostic covariates shrinks the standard error; it is not for confounder control in an RCT.


4 Binary Outcomes – Risk & Odds Scales

4·1 Collapsible Measures → Risk Difference / Risk Ratio

cci events_treat total_treat  events_ctrl total_ctrl  // crude RD & RR

4·2 Non-collapsible Measure → Marginal Odds Ratio

  1. Fit logistic model with covariates (conditional OR):
logit event i.treat age sex
  1. Re-average to recover a marginal effect:
margins treat, predict(pr)            // get arm-specific risks
lincom _b[1.treat]/(1-_b[1.treat]) / (_b[0.treat]/(1-_b[0.treat])) , eform

Margins calculate arm-level predicted probabilities; the lincom line converts those risks into a marginal OR.


5 When Compliance Is Imperfect (R ≠ D)

GoalRecommended estimator / Stata tool
Effectiveness (policy)ITT – as above; remains primary.
Efficacy in compliersCACE via two-stage least squares (IV): ivregress 2sls outcome (D = R) covariates ; estat firststage to diagnose instrument strength.
Supportive PP / ATRestrict or relabel using keep if or replace treat = D – report as sensitivity only.


6 Typical Pitfalls & How to Fix Them

PitfallWhy it mattersStata-first fix
Adjusting for too many baseline covariates “for balance”Up-weights noise → wider CIsLimit to ≤ 5 strong prognostic factors; pre-specify.
Using conditional OR as final resultMis-matches causal estimandAlways run margins to obtain marginal effect.
Multiple versions of treatment emergeBreaks ConsistencyAdd arm indicator for version or stratify analysis.
>15 % event rate yet reporting OROdds mislead at common eventsPrefer RD/RR: riskrr (user package) or cci above.


7 Quick Analysis Checklist

  1. Write the estimand sentence (e.g., “ATE of 30-day mortality for Drug X vs placebo in adults with septic shock”).
  2. Check adherence – if < 90 %, plan CACE alongside ITT.
  3. Pre-select covariates for precision only.
  4. Decide risk vs odds scale before looking at results.
  5. Use margins for all marginal effects; bootstrap (vce(bootstrap)) if you need robust CIs after complex modelling.

8 Take-Home Messages

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment