# NOT RUN {
d <- sampleData(1e2, outcome = "survival")
##
library(survival)
mCox <- coxph(Surv(time, event) ~ X1+X2, data = d)
CoxFormula(mCox)
##
library(rms)
f <- Surv(time, event) ~ X1+X2
mCox <- cph(f, data = d, y = TRUE)
CoxFormula(mCox)
# }
Run the code above in your browser using DataLab