learner_surv_cox: Construct a learner

View source: R/learner_surv_cox.R

learner_surv_coxR Documentation

Construct a learner

Description

Constructs a learner class object for fitting Cox proportional hazards models.

Usage

learner_surv_cox(formula, info = "mets::phreg", learner.args = NULL, ...)

Arguments

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).

Value

learner object.

Author(s)

Klaus Kähler Holst

Examples

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)

targeted documentation built on July 15, 2026, 9:06 a.m.