Learn R Programming

robustbase (version 0.95-1)

psi.findc: Find Tuning Constant(s) for "lqq" and "ggw" Psi Functions

Description

Find psi function tuning constant sets for "LQQ" and "GGW" psi (\(\psi\)) functions by specifying largest descent (minimal slope), efficiency and or breakdown point.

.psi.const() is called from lmrob.control() to set the tuning constants for psi and chi for "LQQ" and "GGW" psi. Unless the specified tuning constants are from fixed small set where the computations are stored precomputed, .psi.const() calls the corresponding .psi.<psi>.findc().

Usage

.psi.ggw.findc(ms, b, eff = NA, bp = NA,
               subdivisions = 100L,
               rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol,
               tol = .Machine$double.eps^0.25, ms.tol = tol/64, maxiter = 1000)

.psi.lqq.findc(ms, b.c, eff = NA, bp = NA, interval = c(0.1, 4), subdivisions = 100L, rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol, tol = .Machine$double.eps^0.25, maxiter = 1000) .psi.const(cc, psi)

Value

a numeric vector of constants, for "lqq" or

"ggw" psi functions, respectively:

"lqq":

\((b, c, s) = (b/c * c, c, s = 1 - min_slope)\),

"ggw":

\((0, a, b, c, \rho(\infty))\).

.psi.const(cc, psi) returns the argument cc with the above constant vectors as attribute "constants", in the case of

psi = "lqq" in all cases (since robustbase version >= 0.93), for psi = "ggw" only in the non-standard cases.

Arguments

ms

number, the minimal slope, typically negative.

b, b.c

number, specifying \(b\) or \(b/c\) for "ggw" or "lqq" respectively.

eff

a number (or NA), the desired efficiency, in \([0,1]\) of the estimator. If NA, bp must be specified as valid number.

bp

a number (or NA), the desired breakdown point of the estimator, in \([0,1]\).

interval

for finding \(c\) via uniroot().

subdivisions

passed to integrate().

rel.tol, abs.tol

relative and absolute tolerance for integrate().

tol

relative tolerance for uniroot().

ms.tol

relative tolerance for the internal .psi.ggw.finda(), eventually passed to optimize inside (internal) .psi.ggw.mxs().

maxiter

maximal number of iterations for uniroot().

cc

(for .psi.const():) numeric vector of length 4, containing all constants c(ms, b*, eff, bp), where b* = b for "ggw" and b* = b.c for "lqq", and one of (eff, bp) is NA.

psi

a string, either "ggw" or "lqq".

Author

Manuel Koller (original) and Martin Maechler (arguments, export, docs).

Details

For some important special cases, the result of .psi.*.findc() are stored precomputed for efficiency reasons. These cases are (the defaults for tuning.chi and tuning.psi respectively in lmrob.control()s result,

tuning.chituning.psi
c(-0.5, 1.5, NA, 0.5)c(-0.5, 1.5, 0.95, NA)

and for "ggw" additionally, these four cases:

tuning.chituning.psi
c(-0.5, 1.5, 0.85, NA)
c(-0.5, 1, NA, 0.5)c(-0.5, 1, 0.95, NA)
c(-0.5, 1, 0.85, NA)

Note that for "ggw", exactly these \(2+4 = 6\) cases also allow fast \(\rho\) and \(\chi\) (aka \(\tilde\rho(\cdot)\), see Mchi), function evaluations. For all other tuning constant settings, rho() evaluations are based on numerical integration via R's own Rdqags() C function (part of R's official API).

References

See the vignette about “\(\psi\)-Functions Available in Robustbase”.

See Also

Mpsi() etc for the psi function definitions; .Mpsi.tuning.defaults, etc, for tuning constants' defaults for lmrob().

Examples

Run this code
(c.ge95 <- .psi.ggw.findc(ms = -0.5, b = 1.5, eff = 0.95))
(c.ge90 <- .psi.ggw.findc(ms = -0.5, b = 1.5, eff = 0.90))
(c.gb50 <- .psi.ggw.findc(ms = -0.5, b = 1.5,  bp = 0.50))
stopifnot(all.equal(c.ge95, c(0, 1.386362,   1.5, 1.0628199,  4.7773893), tol = 1e-5),
          all.equal(c.ge90, c(0, 1.0282811,  1.5, 0.87086259, 3.2075233), tol = 1e-5),
          all.equal(c.gb50, c(0, 0.20367394, 1.5, 0.29591308, 0.37033962),tol = 1e-5))

(cl.e.95 <- .psi.lqq.findc(ms = -0.5, b.c = 1.5, eff = .95))
(cl.b.50 <- .psi.lqq.findc(ms = -0.5, b.c = 1.5,  bp = .50))
stopifnot(all.equal(cl.e.95, c(1.4734061,  0.98227073, 1.5), tol = 1e-5),
          all.equal(cl.b.50, c(0.40154568, 0.26769712, 1.5), tol = 1e-5))

Run the code above in your browser using DataLab