Standardized Survival Probabilities and Contrasts Between Hierarchical Units in Multilevel Survival Models
This repository contains synthetic data and annotated code in Stata and R to replicate the analyses from the manuscript titled “Standardized Survival Probabilities and Contrasts Between Hierarchical Units in Multilevel Survival Models”, published in BMC Medical Research Methodology:
Gasparini, A., Crowther, M.J. & Schaffer, J.M. Standardized survival probabilities and contrasts between hierarchical units in multilevel survival models. BMC Med Res Methodol (2026). https://doi.org/10.1186/s12874-026-02782-8
This repository is organised as follows:
-
The
Statadirectory contains Stata code to replicate the analyses reported in the manuscript; -
The
Rdirectory contains R code to replicate the analyses reported in the manuscript; -
The
data-rawfolder contains R code to generate the synthetic data and prepare it for analysis; -
The
datafolder contains the datasets used for analysis and other data objects that are needed to replicate the analyses; -
Finally, the
outputfolder contains the output of all Stata and R scripts, including logs and a variety of plots depicting the different kind of predictions that could be obtained within the framework.
A tree-like representation of the folders structure is included below.
library(fs)
dir_tree(type = "directory").
├── R
├── Stata
├── data
├── data-raw
└── output
├── R
└── Stata
The code from this repository is licensed under the MIT license. All other content is released under a Creative Commons Zero v1.0 Universal license.