predict.tidycrr: Estimate subdistribution functions for crr objects

View source: R/base_methods.R

predict.tidycrrR Documentation

Estimate subdistribution functions for crr objects

Description

Estimate subdistribution functions for crr objects

Usage

## S3 method for class 'tidycrr'
predict(object, times = NULL, probs = NULL, newdata = NULL, ...)

Arguments

object

a tidycrr object

times

Numeric vector of times to obtain risk estimates at

probs

Numeric vector of quantiles to obtain estimates at

newdata

A base::data.frame() or tibble::tibble() containing all the original predictors used to create x. Defaults to NULL.

...

not used

Value

named list of prediction estimates

See Also

Other crr() functions: broom_methods_crr, crr()

Examples

crr(Surv(ttdeath, death_cr) ~ age, trial) %>%
  predict(times = 12, newdata = trial[1:10, ])

tidycmprsk documentation built on Sept. 11, 2024, 7:24 p.m.