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