Learn R Programming

emil (version 2.2.10)

fit_coxph: Fit Cox proportional hazards model

Description

Fit Cox proportional hazards model

Usage

fit_coxph(x, y, formula = y ~ ., ...)

Arguments

x

Dataset.

y

Response. Required if formula is missing.

formula

See coxph.

...

Sent to coxph.

Value

Fitted Cox proportional hazards model.

See Also

predict_coxph

Examples

Run this code
# NOT RUN {
if(requireNamespace("survival")){

  data("ovarian", package = "survival")
  model <- fit(
      modeling_procedure(
          method = "coxph",
          parameter = list(formula = list(survival::Surv(futime, fustat) ~ age))),
      x = ovarian, y = NULL
  )
  predict(model, ovarian[11:16,])

}
# }

Run the code above in your browser using DataLab