Huber_grid: Calculate the gridient of Huber function for an input value...

View source: R/SupportFunctions.R

Huber_gridR Documentation

Calculate the gridient of Huber function for an input value z.

Usage

Huber_grid(z, M)

Arguments

z

Input value z.

M

Shape parameter, which is defaulted to be one-tenth of the interquartile range (IRQ).

Value

The gridient of Huber function for an input value z

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (delta, M)
{
    ifelse(abs(delta) < M, 2 * delta, 2 * M * sign(delta))
  }

xueweic/APGD documentation built on Sept. 4, 2023, 2:18 a.m.