R/predictProb.rfsrc.R

Defines functions predictProb.rfsrc

Documented in predictProb.rfsrc

predictProb.rfsrc <- function(object, response, x, times, complexity = NULL, ...) {
   .require_suggested_package("randomForestSRC", "predictProb.rfsrc()")

   pred <- randomForestSRC::predict.rfsrc(
      object,
      newdata = as.data.frame(x),
      ...
   )

   curve_times <- pred$time.interest
   if (is.null(curve_times)) {
      curve_times <- object$time.interest
   }

   .peperr_step_curve_matrix(
      curves = pred$survival,
      curve_times = curve_times,
      eval_times = times
   )
}

Try the peperr package in your browser

Any scripts or data that you put into this service are public.

peperr documentation built on March 25, 2026, 9:06 a.m.