tuneLasso {LINselect}R 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.

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)



[Package LINselect version 1.1.5 Index]