R/PLL.coxnet.R

Defines functions PLL.coxnet

Documented in PLL.coxnet

PLL.coxnet <- function(object, newdata, newtime, newstatus, complexity = NULL, ...) {
   .require_suggested_package("glmnet", "PLL.coxnet()")

   lambda <- .peperr_complexity_value(
      complexity = complexity,
      default = attr(object, "peperr_lambda"),
      caller = "PLL.coxnet()"
   )

   lp <- stats::predict(
      object,
      newx = as.matrix(newdata),
      s = lambda,
      type = "link",
      ...
   )

   .peperr_pll_from_linear_predictor(
      linear.predictor = lp,
      time = newtime,
      status = newstatus
   )
}

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.