Learn R Programming

tidycmprsk (version 1.1.0)

predict.tidycrr: Estimate subdistribution functions for crr objects

Description

Estimate subdistribution functions for crr objects

Usage

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

Value

named list of prediction estimates

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

See Also

Other crr() functions: broom_methods_crr, crr()

Examples

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

Run the code above in your browser using DataLab