Construct a redescending psi-function from one of robustbase's
compiled Mpsi families.
makeRobustbasePsi(
family = c("bisquare", "lqq", "optimal", "hampel", "ggw"),
cc = NULL
)psi_func_rcpp object usable as rho.e (or rho.b,
rho.sigma.e, rho.sigma.b) in rlmer.
robustbase Mpsi family name,
one of "bisquare", "lqq", "optimal",
"hampel", "ggw".
tuning constant (a scalar for "bisquare" /
"optimal", a specification vector for "lqq" /
"ggw" / "hampel"). NULL uses the family's
robustbase default (about 95% efficiency at the normal).
Returns a psi_func_rcpp object whose psi, rho, weight and
derivative slots delegate to robustbase's compiled psi-function
family, so the shipped functions match lmrob
exactly. The psi, its derivative and the weight are
Mpsi(x, cc, family, 0),
Mpsi(x, cc, family, 1) and
Mwgt(x, cc, family); the rho slot is the
normalised Mchi(x, cc, family) *
MrhoInf(cc, family), so that rho(Inf)
equals the supremum of rho (the psi_func rho convention used by
rlmer). The Fisher consistency expectations
(Erho, Epsi2, EDpsi) are computed by numerical
integration against the standard normal.
The available families are the redescenders "bisquare" (Tukey
biweight), "lqq" (linear-quadratic-quadratic),
"optimal", "hampel" and "ggw" (generalised
Gauss-weight). When cc is NULL the family's default
tuning (\(\approx 95\%\) efficiency at the normal) is taken from
robustbase::.Mpsi.tuning.default(family); for "lqq",
"ggw" and "hampel" this is a short numeric
specification vector rather than a single cutoff (see
lmrob.control).
Of the redescenders, bisquarePsi redescends comparatively
fast; the "lqq" psi of Koller and Stahel (2011), used by
robustbase's lmrob.control(setting = "KS2014"), is the
recommended redescender and is pre-built as lqqPsi.
Koller, M. and Stahel, W. A. (2011) Sharpening Wald-type inference in robust regression for small samples. Computational Statistics & Data Analysis 55(8), 2504--2515.
lqqPsi, bisquarePsi,
Mpsi, lmrob.control.
pf <- makeRobustbasePsi("lqq")
pf@psi(c(-6, -3, 0, 3, 6))
Run the code above in your browser using DataLab