shrinkage: soft-thresholding function

Description Usage Arguments Details Value Examples

View source: R/shrinkage.R

Description

compute the soft-thresholded result for the Lasso estimator

Usage

1
shrinkage(y, tau)

Arguments

y

input matrix

tau

a float number, which stands for the threshold

Details

This function is to find soft-thresholded lasso estimator

Value

the thresholded matrix with respect to y

Examples

1
2
3
y <- matrix(stats::rnorm(20), 5, 4)
tau <- 0.5
shrinkage(y, tau)

kevinbai92/LSvarEstimate documentation built on May 8, 2020, 1:04 a.m.