Learn R Programming

rmargint (version 2.0.3)

psi.huber: Derivative of Huber's loss function.

Description

This function evaluates the first derivative of Huber's loss function.

Usage

psi.huber(r, k = 1.345)

Value

A vector of the same length as r.

Arguments

r

A vector of real numbers.

k

A positive tuning constant.

Author

Matias Salibian-Barrera, matias@stat.ubc.ca, Alejandra Martinez

Details

This function evaluates the first derivative of Huber's loss function.

Examples

Run this code
x <- seq(-2, 2, length=10)
psi.huber(r=x, k = 1.5)

Run the code above in your browser using DataLab