fit_coxph: Fit Cox proportional hazards model

Description Usage Arguments Value Author(s) See Also Examples

View source: R/survival.r

Description

Fit Cox proportional hazards model

Usage

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

Author(s)

Christofer Bäcklin

See Also

predict_coxph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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,])

}

emil documentation built on Aug. 1, 2018, 1:03 a.m.

Related to fit_coxph in emil...