adalasso: Implement Adaptive Lasso via glmnet

View source: R/adalasso.R

adalassoR Documentation

Implement Adaptive Lasso via glmnet

Description

Estimation function. Tuning parameter inputs needed.
Incorporates both high-dim(Lasso as initial estimator) and low-dim (OLS as initial estimator).

Usage

adalasso(
  x,
  y,
  lambda,
  lambda_lasso = NULL,
  gamma = 1,
  intercept = TRUE,
  scalex = FALSE
)

Arguments

x

Predictor matrix (n-by-p matrix)

y

Response variable

lambda

Shrinkage tuning parameter for the adaptive step

lambda_lasso

Shrinkage tuning parater for the initial step Lasso estimation (If applicable)

gamma

Parameter controlling the inverse of first step estimate

intercept

A boolean: include an intercept term or not

scalex

A boolean: standardize the design matrix or not

Value

A list contains estimated intercept and slope

ahat

Estimated intercept

bhat

Estimated slope

Examples

adalasso(x,y)

zhan-gao/LasForecast documentation built on Sept. 18, 2024, 9:40 p.m.