# NOT RUN {
# Create the simplest test data set
test <- list(time=c(4,3,1,1,2,2,3),
event =c(1,1,1,0,1,1,0),
x =c(5,2,1,1,1,5,5))
# Fit a Cox model
coxmodel <- coxph(Surv(time, event ) ~ x , test)
coxr2(coxmodel)
# }
Run the code above in your browser using DataLab