powered by
Constructs a learner class object for fitting Cox proportional hazards models.
learner_surv_cox(formula, info = "mets::phreg", learner.args = NULL, ...)
learner object.
(formula) Formula specifying response and design matrix.
(character) Optional information to describe the instantiated learner object.
(list) Additional arguments to learner$new().
Additional arguments passed to lower-level functions (e.g., optimization controls).
Klaus Kähler Holst
data(sTRACE, package="mets") mod <- learner_surv_cox(Surv(time, status>0) ~ sex + strata(age)) mod$estimate(sTRACE) mod$predict(head(sTRACE), times=5) # P(T>t|X)
Run the code above in your browser using DataLab