This is a repository of examples of plotting survival curves and time to event analysis.
https://en.wikipedia.org/wiki/Survival_analysis
-
Fitting a Kaplan-Meier and a Cox proportional hazards model
survival_analysis_example.Rmd
-
Fitting survival models advanced inluding advanced options in Cox models, counting options in coxph(), diagnostics for Cox models, time dependent covariates in Cox models, etc
-
survival_advanced.R
-
expand_nomissing_study1.csv
- data file for survival data
-
-
Fitting a piecewise exponential proportional hazards model
piecewise_exponential_proportional_hazards_model.R
-
Fitting a survival model using a GLM Poisson model
simple_glm_survival.R
-
Fitting survival trees
survival_trees.R
-
Meta-analysis of survival models and hazard ratios
metaanalysis_hazard_ratios.R
-
Cheatsheets and other resources
- cheatsheets
-
Adapted from
https://stat.ethz.ch/R-manual/R-devel/library/survival/html/survfit.formula.html
-
Adapted from
https://rviews.rstudio.com/2017/09/25/survival-analysis-with-r/
-
Adapted from
https://stats.stackexchange.com/questions/348922/piecewise-exponential-model-how-to-fit
-
Additional resources
www.stat.columbia.edu/~madigan/W2025/notes/survival.pdf
http://data.princeton.edu/wws509/notes/
-
Contact
- Soumya Banerjee