This function evaluates the first derivative of Tukey's bi-square loss function.

psi.tukey(r, k = 4.685)

Arguments

r

a vector of real numbers

k

a positive tuning constant.

Value

A vector of the same length as x.

Details

This function evaluates the first derivative of Tukey's bi-square loss function.

Author

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

Examples

x <- seq(-2, 2, length=10) psi.tukey(r=x, k = 1.5)
#> [1] 0.0000000 0.0000000 -0.2263050 -0.4293045 -0.2125747 0.2125747 #> [7] 0.4293045 0.2263050 0.0000000 0.0000000