TrialEmulation: Causal Analysis of Observational Time-to-Event Data

Implements target trial emulation methods to apply randomized clinical trial design and analysis in an observational setting. Using marginal structural models, it can estimate intention-to-treat and per-protocol effects in emulated trials using electronic health records. A description and application of the method can be found in Danaei et al (2013) <doi:10.1177/0962280211403603>.

Package details

AuthorIsaac Gravestock [aut, cre] (ORCID: <https://orcid.org/0000-0003-0283-2065>), Li Su [aut], Roonak Rezvani [aut] (ORCID: <https://orcid.org/0000-0001-5580-5058>, Original package author), Julia Moesch [aut], Juliette Limozin [aut] (ORCID: <https://orcid.org/0000-0002-1140-2350>), Medical Research Council (MRC) [fnd], F. Hoffmann-La Roche AG [cph, fnd]
MaintainerIsaac Gravestock <isaac.gravestock@gmail.com>
LicenseApache License (>= 2)
Version0.0.5
URL https://causal-lda.github.io/TrialEmulation/  https://github.com/Causal-LDA/TrialEmulation 
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("TrialEmulation")

Try the TrialEmulation package in your browser

Any scripts or data that you put into this service are public.

TrialEmulation documentation built on Aug. 25, 2026, 5:08 p.m.