survival_prob_survreg: Internal function helps for parametric survival models

View source: R/survival_reg-survival.R

survival_prob_survregR Documentation

Internal function helps for parametric survival models

Description

Internal function helps for parametric survival models

Usage

survival_prob_survreg(object, new_data, eval_time, time = deprecated())

hazard_survreg(object, new_data, eval_time)

Arguments

object

A parsnip model_fit object resulting from survival_reg() with engine = "survival".

new_data

A data frame.

eval_time

A vector of time points.

time

Deprecated in favor of eval_time. A vector of time points.

Value

A tibble with a list column of nested tibbles.

Examples

mod <- survival_reg() %>% 
  set_engine("survival") %>%
  fit(Surv(time, status) ~ ., data = lung)
survival_prob_survreg(mod, lung[1:3, ], eval_time = 100)
hazard_survreg(mod, lung[1:3, ], eval_time = 100)

EmilHvitfeldt/survnip documentation built on April 23, 2024, 3:07 p.m.