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

View source: R/lasso_weight.R

lasso_weight_singleR Documentation

Implement weighted Lasso estimation (second step of adaptive lasso) via coordinate descent for the case in which only one predictor remains

Description

Estimation function. Tuning parameter inputs needed.

Usage

lasso_weight_single(x, y, lambda, w = NULL, intercept = TRUE, scalex = FALSE)

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

Value

A list contains estimated intercept and slope

ahat

Estimated intercept

bhat

Estimated slope


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