Learn to emulate the trial you cannot run.
A complete course in causal inference and target trial emulation, from counterfactuals to quantitative bias analysis. Forty-five chapters, a DAG builder that finds your adjustment set, an R console in the page, and eleven calculators for the sensitivity analyses reviewers ask for.
Forty-five chapters, in order
Each chapter states the assumption it depends on, shows the estimator, and gives you R you can run in the next tab.
Counterfactuals, causal graphs, confounding, selection bias and measurement error. The vocabulary everything else is written in.
Propensity scores, inverse probability weighting, standardization, g-formula, marginal structural models and survival analysis.
Time-varying treatment, mediation, instrumental variables and quantitative bias analysis, including probabilistic and Bayesian approaches.
Practice, not just reading
DAG builder
Draw a causal graph and let it find the adjustment sets. Checks d-separation, marks colliders, and tells you which variables you must not condition on.
R playground
Run R in the browser against the NHEFS dataset used throughout the course, so an example in a chapter is one you can change and rerun.
Eleven calculators
E-value, bias factor, misclassification, selection bias, probabilistic bias analysis, propensity overlap, IPW diagnostics, SMD, NNT, sample size and effect conversion.
Does an emulation actually match its trial?
Xera OpenScience maintains a living systematic review of published target trial emulations paired with the randomized trials they emulate. The course teaches the method; the database says how well it has worked so far.
Live from the OpenScience database. A well-calibrated method would sit near 95%.
Four steps, one discipline
Specify the target trial
Write the protocol you would run if you could randomize: eligibility, treatment strategies, assignment, outcome, follow-up, and the causal contrast.
Emulate each component
Map the protocol onto the data you actually have, one component at a time, and record where the data cannot supply what the protocol asks for.
Align time zero
Eligibility, treatment assignment and the start of follow-up must coincide. Most immortal time bias is a failure of this single step.
Estimate and probe
Use a method that matches the estimand, then quantify how far unmeasured confounding or misclassification would have to reach to overturn it.
Start reading. An account only saves your progress.
Every chapter, tool and calculator is open. Signing in records which chapters you have finished and keeps your saved DAGs.