Estimate subdistribution functions for crr objects

# S3 method for 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, ])
#> 11 cases omitted due to missing values
#> $`time 12`
#>  [1] 0.04130071 0.03813431 0.04322411         NA 0.04842348 0.04523496
#>  [7] 0.04472385 0.04347061 0.04322411 0.04396773
#>