Description Usage Arguments Value
Fit adaptive lasso model with intercept. The penalty for each beta_j coefficient in the model is weighted by 1 / |beta_ini_j|^gam, where beta_ini_j is an initial estimate of beta, here obtained through OLS. Then, a LASSO is run. The optimal lambda is selected through cross-validation.
| 1 | adaptive_lasso(xs, ys, gam = 1, nfolds = 5)
 | 
| xs | Matrix of predictors. Should be standardized and centered to have mean 0, variance 1 | 
| ys | Matrix or vector of observations. Does not need to be centered. | 
| gam | Power for penalty weights. | 
| nfolds | Number of cross-validation folds. | 
A cv.glmnet object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.