Learn R Programming

mpath (version 0.4-2.21)

compute_wt: Weight value from concave function

Description

Weight value from concave function

Usage

compute_wt(z, weights, cfun, s, delta=0.0001)

Arguments

z

vector nonnegative values from dfun, e.g., u^2/2

weights

optional numeric vector of weights.

cfun

integer from 1-8, concave function as in ccglm_fit

s

a numeric value, see details in ccglm_fit

delta

a positive small value, see details in ccglm_fit

Value

Weight value from concave function

References

Zhu Wang (2020) Unified Robust Estimation via the COCO, arXiv e-prints, https://arxiv.org/abs/2010.02848

See Also

ccglmreg

Examples

Run this code
# NOT RUN {
u <- seq(0, 4, by=0.01)
z <- u^2/2 ### this is dfun
res <- compute_wt(z, cfun=1, s=1)
plot(z, res, ylab="Weight", type="l", lwd=2, 
     main=expression(paste("hcave", "   (", sigma, "=1)", )))
# }

Run the code above in your browser using DataLab