These are deprecated, replaced by Mchi(*, psi="tukey"), Mpsi(*, psi="tukey")

tukeyPsi1() computes Tukey's bi-square score (psi) function, its first derivative or it's integral/“principal function”. This is scaled such that \(\psi'(0) = 1\), i.e., \(\psi(x) \approx x\) around 0.

tukeyChi() computes Tukey's bi-square loss function, chi(x) and its first two derivatives. Note that in the general context of \(M\)-estimators, these loss functions are called \(\rho (rho)\)-functions.

tukeyPsi1(x, cc, deriv = 0)
tukeyChi (x, cc, deriv = 0)

Arguments

x

numeric vector.

cc

tuning constant

deriv

integer in \(\{-1,0,1,2\}\) specifying the order of the derivative; the default, deriv = 0 computes the psi-, or chi- ("rho"-)function.

Value

a numeric vector of the same length as x.

Note

tukeyPsi1(x, d) and tukeyChi(x, d+1) are just re-scaled versions of each other (for d in -1:1), i.e., $$\chi^{(\nu)}(x, c) = (6/c^2) \psi^{(\nu-1)}(x,c),$$ for \(\nu = 0,1,2\).

We use the name ‘tukeyPsi1’, because tukeyPsi is reserved for a future “Psi Function” class object, see psiFunc.

See also

lmrob and Mpsi; further anova.lmrob which needs the deriv = -1.

Author

Matias Salibian-Barrera, Martin Maechler and Andreas Ruckstuhl

Examples