Code for carrying out the parametric g-formula using data from a cohort of bone marrow transplant patients
Source paper: Keil, Alexander P., et al. "The parametric G-formula for time-to-event data: towards intuition with a worked example." Epidemiology (Cambridge, Mass.) 25.6 (2014): 889.
Note that the published paper has accompanying code, and the repository here has the same code but with small corrections made with the help of some very attentive readers who spotted some small coding errors.