| tuneLasso | R Documentation |
tune the lasso parameter in the
regression model : Y= X \beta + \sigma N(0,1)
using the lasso or the gauss-lasso method
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)
Y |
vector with n components : response variable. |
X |
matrix with n rows and p columns : covariates. |
normalize |
logical : corresponds to the input |
method |
vector of characters whose components are subset of (“lasso”, “Glasso”) |
dmax |
integer : maximum number of variables in the lasso
estimator. |
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 |
K |
scalar : value of the parameter |
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. |
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.
library elasticnet is loaded.
Yannick Baraud, Christophe Giraud, Sylvie Huet
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
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.