Thomas, L., and E. M. Reyes. “Tutorial: Survival Estimation for Cox Regression Models With Time-Varying Coefficients Using SAS and R”. Journal of Statistical Software, Code Snippets, vol. 61, no. 1, Oct. 2014, pp. 1-23, doi:10.18637/jss.v061.c01.