proportional_hazards: Proportional hazards regression

Description Usage Arguments Details See Also Examples

View source: R/proportional_hazards.R

Description

proportional_hazards() is a way to generate a specification of a model before fitting and allows the model to be created using different packages in R. The main arguments for the model are:

These arguments are converted to their specific names at the time that the model is fit. Other options and arguments can be set using set_engine(). If left to their defaults here (NULL), the values are taken from the underlying model functions. If parameters need to be modified, update() can be used in lieu of recreating the object from scratch.

Usage

1
2
3
4
5
6
proportional_hazards(
  mode = "censored regression",
  engine = "survival",
  penalty = NULL,
  mixture = NULL
)

Arguments

mode

A single character string for the prediction outcome mode. Possible values for this model are "unknown", or "censored regression".

engine

A single character string specifying what computational engine to use for fitting. Possible engines are listed below. The default for this model is "survival".

penalty

A non-negative number representing the total amount of regularization (specific engines only).

mixture

A number between zero and one (inclusive) that is the proportion of L1 regularization (i.e. lasso) in the model. When mixture = 1, it is a pure lasso model while mixture = 0 indicates that ridge regression is being used (specific engines only).

Details

Proportional hazards models include the Cox model. For proportional_hazards(), the mode will always be "censored regression".

See Also

fit.model_spec(), set_engine(), update()

Examples

1
show_engines("proportional_hazards")

parsnip documentation built on July 21, 2021, 5:08 p.m.