r descr_models("survival_reg", "survival")
defaults <- tibble::tibble(parsnip = c("dist"), default = c("'weibull'")) param <- survival_reg() %>% set_engine("survival") %>% set_mode("censored regression") %>% make_parameter_list(defaults)
This model has r nrow(param)
tuning parameters:
param$item
r uses_extension("survival_reg", "survival", "censored regression")
library(censored) survival_reg(dist = character(1)) %>% set_engine("survival") %>% set_mode("censored regression") %>% translate()
In the translated syntax above, note that model = TRUE
is needed to produce quantile predictions when there is a stratification variable and can be overridden in other cases.
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 model scale parameter 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 scale parameters for each value of the column:
library(survival) survival_reg() %>% fit(Surv(futime, fustat) ~ age + strata(rx), data = ovarian) %>% extract_fit_engine()
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.