Skip to contents

Fits an adaptive Lasso regression and returns the results as a tibble. The function can be used with tidyfit.

Usage

m.adalasso(x, y, lambda = NULL, ...)

Arguments

x

input matrix or data.frame, of dimension \((N\times p)\); each row is an observation vector.

y

response variable.

lambda

shrinkage parameter or vector of shrinkage parameters.

...

Additional arguments passed to glmnet::glmnet.

Value

A 'tibble'.

Details

The adaptive Lasso is a weighted implementation of the Lasso algorithm, with covariate-specific weights obtained using an initial regression fit (in this case, a ridge regression with lambda = 0.01). The adaptive Lasso is computed using the 'glmnet' package.

The function can be used for classification or regression, covariates are standardized and an intercept is always included.

References

Zou, H. (2006). The Adaptive Lasso and Its Oracle Properties. Journal of the American Statistical Association, 101(476), 1418-1429.

Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1-22. URL https://www.jstatsoft.org/v33/i01/.

See also

m.lasso, m.enet and m.ridge methods

Author

Johann Pfitzinger

Examples

x = matrix(rnorm(100 * 20), 100, 20)
y = rnorm(100)
fit = m.adalasso(x, y, lambda = 0.1)