tuneLasso: tuneLasso

tuneLassoR Documentation

tuneLasso

Description

tune the lasso parameter in the regression model : Y= X \beta + \sigma N(0,1) using the lasso or the gauss-lasso method

Usage

tuneLasso(Y, X, normalize = TRUE, method = c("lasso", "Glasso"), 
    dmax = NULL, Vfold = TRUE, V = 10, LINselect = TRUE, a = 0.5, 
    K = 1.1, verbose = TRUE, max.steps = NULL)

Arguments

Y

vector with n components : response variable.

X

matrix with n rows and p columns : covariates.

normalize

logical : corresponds to the input normalize of the functions enet and cv.enet.
If TRUE the variates X are normalized.

method

vector of characters whose components are subset of (“lasso”, “Glasso”)

dmax

integer : maximum number of variables in the lasso estimator. dmax \le D where
D = min (3*p/4 , n-5) if p \ge n
D= min(p,n-5) if p < n.
Default : dmax = D.

Vfold

logical : if TRUE the tuning is done by Vfold-CV

V

integer. Gives the value of V in the Vfold-CV procedure

LINselect

logical : if TRUE the tuning is done by LINselect

a

scalar : value of the parameter \alpha in the LINselect criteria

K

scalar : value of the parameter K in the LINselect criteria

verbose

logical : if TRUE a trace of the current process is displayed in real time.

max.steps

integer : maximum number of steps in the lasso procedure.
Corresponds to the input max.steps of the function enet.
Default : max.steps = 2*min(p,n)

Value

A list with one or two components according to method.
lasso if method contains "lasso" is a list with one or two components according to Vfold and LINselect.

  • Ls if LINselect=TRUE. A list with components

    • support: vector of integers. Estimated support of the parameter vector \beta.

    • coef: vector whose first component is the estimated intercept.
      The other components are the estimated non zero coefficients.

    • fitted: vector with length n. Fitted value of the response.

    • crit: vector containing the values of the criteria for each value of lambda.

    • lambda: vector containing the values of the tuning parameter of the lasso algorithm.

  • CV if Vfold=TRUE. A list with components

    • support: vector of integers. Estimated support of the parameter vector \beta.

    • coef: vector whose first component is the estimated intercept.
      The other components are the estimated non zero coefficients.

    • fitted: vector with length n. Fitted value of the response.

    • crit: vector containing the values of the criteria for each value of lambda.

    • crit.err: vector containing the estimated standard-error of the criteria.

    • lambda: vector containing the values of the tuning parameter of the lasso algorithm.

Glasso if method contains "Glasso". The same as lasso.

Note

library elasticnet is loaded.

Author(s)

Yannick Baraud, Christophe Giraud, Sylvie Huet

References

See Baraud et al. 2010 http://hal.archives-ouvertes.fr/hal-00502156/fr/
Giraud et al., 2013, https://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.ss/1356098553

Examples

#source("charge.R")
library("LINselect")

# simulate data with
## Not run: ex <- simulData(p=100,n=100,r=0.8,rSN=5)

## Not run: ex1.tuneLasso <- tuneLasso(ex$Y,ex$X)

## Not run: data(diabetes)
## Not run: attach(diabetes)
## Not run: ex.diab <- tuneLasso(y,x2)
## Not run: detach(diabetes)



LINselect documentation built on Aug. 30, 2023, 9:10 a.m.