Xera · free and open

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.

Chapters
45
three levels, in order
Calculators
11
bias and design
Interactive tools
2
DAG builder, R console
Price
Free
no account needed to read
The course

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.

BeginnerChapters 1–15

Counterfactuals, causal graphs, confounding, selection bias and measurement error. The vocabulary everything else is written in.

IntermediateChapters 16–33

Propensity scores, inverse probability weighting, standardization, g-formula, marginal structural models and survival analysis.

AdvancedChapters 34–45

Time-varying treatment, mediation, instrumental variables and quantitative bias analysis, including probabilistic and Bayesian approaches.

The tools

Practice, not just reading

The evidence

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.

Studies
129
Comparisons
474
279 in the pooled models
Target trials
94
Interval coverage
53.4%
149 of 279 contain the trial estimate

Live from the OpenScience database. A well-calibrated method would sit near 95%.

The framework

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.