lasso_weight_opt: Implement weighted Lasso estimation (second step of adaptive...

View source: R/lasso_weight.R

lasso_weight_optR Documentation

Implement weighted Lasso estimation (second step of adaptive lasso) via optimization solver

Description

Estimation function. Tuning parameter inputs needed.

Usage

lasso_weight_opt(
  x,
  y,
  lambda,
  w = NULL,
  intercept = TRUE,
  scalex = FALSE,
  solver = "CVXR",
  rtol = 1e-08,
  verb = 0
)

Arguments

x

Predictor matrix (n-by-p matrix)

y

Response variable

lambda

Shrinkage tuning parameter

w

weights

intercept

A boolean: include an intercept term or not

scalex

A boolean: standardize the design matrix or not

solver

indicate solver in use, c("CVXR", "MOSEK")

Value

A list contains estimated intercept and slope

ahat

Estimated intercept

bhat

Estimated slope

Examples

lasso_weight_opt(x,y)

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