psi-functions: Classical, Huber and smoothed Huber psi- or rho-functions

psi-functionsR Documentation

Classical, Huber and smoothed Huber psi- or rho-functions

Description

\psi-functions are used by rlmer in the estimating equations and to compute robustness weights. Change tuning parameters using chgDefaults and convert to squared robustness weights using the psi2propII function.

Usage

## see examples

Details

The “classical” \psi-function cPsi can be used to get a non-robust, i.e., classical, fit. The psi slot equals the identity function, and the rho slot equals quadratic function. Accordingly, the robustness weights will always be 1 when using cPsi.

The Huber \psi-function huberPsi is identical to the one in the package robustbase. The psi slot equals the identity function within \pm k (where k is the tuning parameter). Outside this interval it is equal to \pm k. The rho slot equals the quadratic function within \pm k and a linear function outside.

The smoothed Huber \psi-function is very similar to the regular Huber \psi-function. Instead of a sharp bend like the Huber function, the smoothed Huber function bends smoothly. The first tuning contant, k, can be compared to the tuning constant of the original Huber function. The second tuning constant, s, determines the smoothness of the bend.

See Also

chgDefaults and psi2propII for changing tuning parameters; psi_func-class for a more detailed description of the slots;

Examples

plot(cPsi)
plot(huberPsiRcpp)
plot(smoothPsi)
curve(cPsi@psi(x), 0, 3, col="blue")
curve(smoothPsi@psi(x), 0, 3, add=TRUE)
curve(huberPsiRcpp@psi(x), 0, 3, add=TRUE, col="green")

robustlmm documentation built on Nov. 15, 2023, 1:07 a.m.