View source: R/learner_surv_cox.R
| learner_surv_cox | R Documentation |
Constructs a learner class object for fitting Cox proportional hazards models.
learner_surv_cox(formula, info = "mets::phreg", learner.args = NULL, ...)
formula |
(formula) Formula specifying response and design matrix. |
info |
(character) Optional information to describe the instantiated learner object. |
learner.args |
(list) Additional arguments to learner$new(). |
... |
Additional arguments passed to lower-level functions (e.g., optimization controls). |
learner object.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.