Learn R Programming

robustbase (version 0.92-7)

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.

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)

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().

Value

constants for "lqq" psi functions: $(b, c, s) = (b/c * c, c, s = 1 - min_slope)$

See Also

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

Examples

Run this code
(c.ge95 <- .psi.ggw.findc(ms = -.5, b = 1.5, eff = 0.95))
(c.ge90 <- .psi.ggw.findc(ms = -.5, b = 1.5, eff = 0.90))
(c.gb50 <- .psi.ggw.findc(ms = -.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 = -.5, b.c = 1.5, eff = .95))
(cl.b.50 <- .psi.lqq.findc(ms = -.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