Regression coefficients and predicted values in LASSO-type problems {SFSI}R Documentation

LASSO methods

Description

Retrieving regression coefficients and predicted values from the 'solveEN' and 'LARS' functions' outputs

Usage

## S3 method for class 'LASSO'
coef(object, ...)

## S3 method for class 'LASSO'
predict(object, ...)

Arguments

object

An object of the class 'LASSO' returned either by the function 'LARS' or 'solveEN'

...

Other arguments:

  • X (numeric matrix) scores for as many predictors there are in ncol(object$beta) (in columns) for a desired number n of observations (in rows)

  • iy (integer vector) Optional index of columns of the matrix 'Gamma' to be returned in coef function

  • ilambda (integer) Optional to return regression coefficients associated to a specific penalty position

  • nsup (numeric) Optional to return regression coefficients associated to a given penalty that yield approximately 'nsup' non-zero coefficients

Value

Method coef returns a matrix that contains the regression coefficients (in rows) associated to each value of lambda (in columns). When the regression was applied to an object Gamma with more than one column, method coef returns a list

Method predict returns a matrix with predicted values Xβ (in rows) for each value of lambda (in columns).

Examples

  # See examples in
  # help(solveEN, package="SFSI")
  # help(LARS, package="SFSI")

[Package SFSI version 1.4 Index]