Learn R Programming

varycoef (version 0.3.0)

d.SCAD: Derivative of Smoothly Clipped Absolute Deviation Penalty

Description

derivative of SCAD, which is not differentiable at x == 0.

Usage

d.SCAD(x, lambda = 1, a = 3.7, d.side = "both")

Arguments

x

numeric.

lambda

non-negative scalar, shrinkage parameter.

a

scalar larger than 2. Fan & Li (2001) suggest \(a = 3.7\).

d.side

side of serivative at origin. Default value is "both", returning NA for x == 0. If set to "RHS", then returns RHS derivative, i.e., \(\lambda\), and \(-\lambda\) with "LHS".

Value

derivative of SCAD(x), for x == 0 return value is NA.

Examples

Run this code
# NOT RUN {
d.SCAD(-5:5)
d.SCAD(-2:2, d.side = "LHS")
curve(d.SCAD, from = -5, to = 5)
# }

Run the code above in your browser using DataLab