HuberFunction: Calculate the Huber function for an input value z.

View source: R/SupportFunctions.R

HuberFunctionR Documentation

Calculate the Huber function for an input value z.

Usage

HuberFunction(z, M)

Arguments

z

Input value z

M

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

Value

The 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, delta^2, 2 * M * abs(delta) - M^2)
  }

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