r descr_models("proportional_hazards", "survival")
This model has no tuning parameters.
r uses_extension("proportional_hazards", "survival", "censored regression")
library(censored) proportional_hazards() %>% set_engine("survival") %>% set_mode("censored regression") %>% translate()
The model does not fit an intercept.
The main interface for this model uses the formula method since the model specification typically involved the use of [survival::Surv()].
The model formula can include special terms, such as [survival::strata()]. The allows the baseline hazard to differ between groups contained in the function. The column used inside strata()
is treated as qualitative no matter its type. To learn more about using special terms in formulas with tidymodels, see [?model_formula
][parsnip::model_formula].
For example, in this model, the numeric column rx
is used to estimate two different baseline hazards for each value of the column:
library(survival) proportional_hazards() %>% fit(Surv(futime, fustat) ~ age + strata(rx), data = ovarian) %>% extract_fit_engine() %>% # Two different hazards for each value of 'rx' basehaz()
Note that columns used in the strata()
function will not be estimated in the regular portion of the model (i.e., within the linear predictor).
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.