Thomas, L. and 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), pp. 1–23. doi: 10.18637/jss.v061.c01.