d <- sampleData(1e2, outcome = "survival")
d$entry <- 0
##
library(survival)
mCox <- coxph(Surv(time, event) ~ X1+X2, data = d)
CoxN(mCox)
##
library(rms)
mCox <- cph(Surv(time, event) ~ X1+X2, data = d, y = TRUE)
CoxN(mCox)
##
library(mets)
mCox <- phreg(Surv(entry, time, event) ~ X1+X2, data = d)
CoxN(mCox)
Run the code above in your browser using DataLab