R/predictProb.SGL_cox.R

Defines functions predictProb.SGL_cox

Documented in predictProb.SGL_cox

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

   context <- .peperr_training_context(object, "predictProb.SGL_cox()")
   lp_new <- .SGL_linear_predictor(object, x, complexity, "predictProb.SGL_cox()")
   lp_train <- .SGL_linear_predictor(object, context$x, complexity, "predictProb.SGL_cox()")

   .peperr_breslow_survival(
      train_time = context$response[, "time"],
      train_status = context$response[, "status"],
      train_lp = lp_train,
      new_lp = lp_new,
      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.