logLik.tramnet: logLik method for class '"tramnet"'

View source: R/methods.R

logLik.tramnetR Documentation

logLik method for class "tramnet"

Description

logLik method for class "tramnet"

Usage

## S3 method for class 'tramnet'
logLik(
  object,
  parm = coef(object, tol = 0, with_baseline = TRUE, scaled = TRUE),
  w = NULL,
  newdata,
  ...
)

Arguments

object

object of class "tramnet"

parm

parameters to evaluate the log likelihood at (for models fitted via the formula interface, shift parameters refer to the scaled covariates)

w

weights, defaults to the weights used for fitting object if newdata is missing

newdata

data to evaluate the log likelihood at

...

Additional arguments to logLik

Value

returns potentially weighted (w) log-likelihood based on object evaluated at parameters parm and data newdata. If newdata is missing, the penalized log-likelihood of the training data is returned, otherwise the (unpenalized) out-of-sample log-likelihood

Author(s)

Lucas Kook, Torsten Hothorn


tramnet documentation built on Oct. 16, 2026, 5:07 p.m.