Thomas, L., & Reyes, E. M. (2014). Tutorial: Survival Estimation for Cox Regression Models with Time-Varying Coefficients Using SAS and R. Journal of Statistical Software, Code Snippets, 61(1), 1–23. https://doi.org/10.18637/jss.v061.c01