survival_time_survbagg {censored}R Documentation

A wrapper for survival times with survbagg models

Description

A wrapper for survival times with survbagg models

Usage

survival_time_survbagg(object, new_data)

Arguments

object

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

new_data

Data for prediction

Value

A vector.

Examples


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


[Package censored version 0.3.2 Index]