Learn R Programming

smog (version 2.1.0)

prox: Composite proximal operator based on L2, L2-Square, and L1 penalties

Description

Composite proximal operator based on L2, L2-Square, and L1 penalties

Usage

prox(x, lambda, hierarchy, d)

Arguments

x

A numeric vector of two.

lambda

a vector of three penalty parameters. \(\lambda_1\) and \(\lambda_2\) are L2 and L2-Square (ridge) penalties for \(x\) in a group level, and \(\lambda_3\) is the L1 penalty for \(x_2\), respectively.

hierarchy

a factor value in levels 0, 1, 2, which represent different hierarchical structure in x, respectively. When hierarchy=0, \(\lambda_2\) and \(\lambda_3\) are forced to be zeroes; when hierarchy=1, \(\lambda_2\) is forced to be zero; when hierarchy=2, there is no constraint on \(\lambda\)'s. See smog.

d

indices for overlapped variables in x.

Value

A two-dimensional numerical vector, soft-thresholded based on a composition of \(\lambda_1\), \(\lambda_2\), and \(\lambda_3\).

References

ma2019structuralsmog

See Also

cv.smog, smog.default, smog.formula, predict.smog, plot.smog.

Examples

Run this code
# NOT RUN {
prox(x = rnorm(6,2,1), lambda = c(0.5,0.3,0.1), hierarchy = 0, d = c(1,1,2,2,3,3))

# }

Run the code above in your browser using DataLab