Description Usage Arguments Examples
Cross validation for linear models with the lasso penalty
where n is the sample size and λ is a tuning parameter that controls the sparsity of β.
1 2 3 4  | 
x | 
 The design matrix  | 
y | 
 The response vector  | 
lambda | 
 A user provided sequence of λ. If set to
  | 
gamma | 
 bandwidth for MCP/SCAD  | 
type.measure | 
 measure to evaluate for cross-validation. The default is   | 
nfolds | 
 number of folds for cross-validation. default is 10. 3 is smallest value allowed.  | 
foldid | 
 an optional vector of values between 1 and nfold specifying which fold each observation belongs to.  | 
grouped | 
 Like in glmnet, this is an experimental argument, with default   | 
keep | 
 If   | 
parallel | 
 If TRUE, use parallel foreach to fit each fold. Must register parallel before hand, such as doMC.  | 
... | 
 other parameters to be passed to   | 
1 2 3 4 5 6 7 8 9  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.