adaptive_lasso: Fit adaptive lasso model

Description Usage Arguments Value

View source: R/simulation.R

Description

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.

Usage

1
adaptive_lasso(xs, ys, gam = 1, nfolds = 5)

Arguments

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.

Value

A cv.glmnet object


shiandy/bst235project documentation built on May 14, 2019, 2:01 a.m.