survival_prob_survbagg: A wrapper for survival probabilities with 'survbagg' models

View source: R/bag_tree-rpart.R

survival_prob_survbaggR Documentation

A wrapper for survival probabilities with survbagg models

Description

A wrapper for survival probabilities with survbagg models

Usage

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

Arguments

object

A parsnip model_fit object resulting from bag_tree() with engine = "rpart".

new_data

Data for prediction.

eval_time

A vector of prediction times.

time

Deprecated in favor of eval_time. A vector of prediction times.

Value

A vctrs list of tibbles.

Examples


bagged_tree <- bag_tree() %>%
  set_engine("rpart") %>%
  set_mode("censored regression") %>%
  fit(Surv(time, status) ~ age + ph.ecog, data = lung)
survival_prob_survbagg(bagged_tree, lung[1:3, ], eval_time = 100)


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