Description Usage Arguments Details Value Author(s) See Also Examples
Does kfold crossvalidation for ernet, produces a plot, and returns a value for lambda
. This function is based on the cv
function from the glmnet
package.
1 2 
x 

y 
response variable 
lambda 
optional usersupplied lambda sequence; default is 
nfolds 
number of folds. Default value is 5. Although

foldid 
an optional vector of values between 1 and 
pred.loss 
loss function used to calculate crossvalidation error. The only option now is 
tau 
the asymmetry coefficient τ used in the asymmetric squared error loss. 
... 
other arguments that can be passed to ernet. 
The function runs ernet
nfolds
+1 times; the first to get the lambda
sequence, and the remainder to compute the fit with each of the folds removed. The average error and standard deviation over the folds are computed.
an object of class cv.ernet
is returned, which is a list with the ingredients of the crossvalidation fit.
lambda 
the values of 
cvm 
the mean crossvalidated error  a vector of length 
cvsd 
estimate of standard error of 
cvupper 
upper curve = 
cvlower 
lower curve = 
nzero 
number of nonzero coefficients at each 
name 
a text string indicating type of measure (for plotting purposes). 
ernet.fit 
a fitted 
lambda.min 
The optimal value of 
lambda.1se 
The largest value of 
Yuwen Gu and Hui Zou
Maintainer: Yuwen Gu <guxxx192@umn.edu>
1 2 3 4 5 6 7 8 9 10 11 12 
Loading required package: Matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.