Intro Stat with Randomization and Simulation
overviewtextbooklabsvideosteachersforumsextras
Survival Analysis in R

The PDF below provides a guide to survival analysis in R using the survival package, supplemented by the KMsurv and OIsurv packages for additional data sets and functions.

Attention: the package is not currently installing from CRAN. However, you can install the package from Github with the following commands:

install.packages("devtools") # (if not already installed)
library(devtools)
install_github("OpenIntroStat/openintro-r-package/unused/OIsurv")
Survival Analysis in R (PDF) Full set of code used in guide

Prerequisites: basic knowledge of R, comfort with the survival analysis material discussed.

This guide would be a useful supplement to the textbook Survival Analysis: Techniques for Censored and Truncated Data by Klein and Moeschberger (Amazon, Barnes and Noble). There is no association between this textbook or its authors and OpenIntro.

Supplemental code for Cox PH, time-dependent covariates

Users who are especially interested in the application of Cox PH models using time-dependent covariates may be interested in one additional function, which has been kindly provided by Beau Benjamin Bruce.

Code containing df.cp function