# tuneLasso: tuneLasso In LINselect: Selection of Linear Estimators

## Description

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

## Usage

 ```1 2 3``` ```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` ≤ D where D = min (3*p/4 , n-5) if p ≥ 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 α 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 β.

• `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 β.

• `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, http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.ss/1356098553

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```#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 Jan. 10, 2020, 9:08 a.m.