penfit function

Penalized regression object

Penalized regression object

Stores the result of a call to penalized. class

Slots

  • penalized:: Object of class "vector". Regression coefficients for the penalized covariates.
  • unpenalized:: Object of class "vector". Regression coefficients for the unpenalized covariates.
  • residuals:: Object of class "vector". Unstandardized residuals for each subject in the fitted model. Martingale residuals are given for the cox model.
  • fitted:: Object of class "vector". Fitted values (means) for each subject in the fitted model. In the cox model, this slot holds the relative risks.
  • lin.pred:: Object of class "vector". Linear predictors for each subject in the fitted model.
  • loglik:: Object of class "numeric". Log likelihood of the fitted model. For the Cox model, reports the full likelihood rather than the partial likelihood.
  • penalty:: Object of class "vector". L1 and L2 penalties of the fitted model.
  • iterations:: Object of class "numeric". Number of iterations used in the fitting process.
  • converged:: Object of class "logical". Whether the fitting process was judged to be converged.
  • model:: Object of class "character". The name of the generalized linear model used.
  • lambda1:: Object of class "vector". The lambda1 parameter(s) used.
  • lambda2:: Object of class "vector". The lambda2 parameter(s) used.
  • nuisance:: Object of class "list". The maximum likelihood estimates of any nuisance parameters in the model.
  • weights:: Object of class "vector". The weights of the covariates used for standardization.
  • formula:: Object of class "list". A named list containing the unpenalized and penalized formula objects, if present.

Methods

  • basehaz: (penfit): Returns the baseline hazard (a data.frame) if a cox model was fitted, NULL otherwise. An additional argument center (default (TRUE) can be used to give the survival curve at the covariate mean (center = TRUE) rather than at zero.
  • basesurv: (penfit): Returns the baseline survival curve (a breslow object) if a cox model was fitted, NULL otherwise. An additional argument center (default (TRUE) can be used to give the survival curve at the covariate mean (center = TRUE) rather than at zero.
  • coef: (penfit): Returns the regression coefficients. Accepts a second argument "which", that takes values "nonzero" (the default), "all", "penalized" or "unpenalized" for extracting only the non-zero, the penalized or the unpenalized regression coefficients. A third argument "standardize" (default FALSE) can be used to let the method return the regression coefficients for the standardized covariates.
  • coefficients: (penfit): synonym for coef above.
  • fitted: (penfit): Returns the fitted values for each subject (i.e. the predicted means). In the Cox model, this method returns the relative risks for each individual.
  • fitted.values: (penfit): synonym for fitted above.
  • linear.predictors: (penfit): Returns the linear predictors for each subject.
  • loglik: (penfit): Returns the log likelihood of the fitted model.
  • penalty: (penfit): Returns the L1 and L2 penalties of the fitted model.
  • residuals: (penfit): Returns the residuals.
  • show: (penfit): Summarizes the fitted model.
  • weights: (penfit): Returns the weights used for standardization.
  • predict: (penfit): Calculates predictions for new subjects. See predict.

Author(s)

Jelle Goeman: j.j.goeman@lumc.nl

See Also

penalized.

  • Maintainer: Jelle Goeman
  • License: GPL (>= 2)
  • Last published: 2022-04-23

Useful links