cniperCont(IC1, IC2, data = NULL, ..., neighbor, risk, lower = getdistrOption("DistrResolution"), upper = 1 - getdistrOption("DistrResolution"), n = 101, scaleX = FALSE, scaleX.fct, scaleX.inv, scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv = qnorm, scaleN = 9, x.ticks = NULL, y.ticks = NULL, cex.pts = 1, cex.pts.fun = NULL, col.pts = par("col"), pch.pts = 19, jit.fac = 1, jit.tol = .Machine$double.eps, with.lab = FALSE, lab.pts = NULL, lab.font = NULL, alpha.trsp = NA, which.lbs = NULL, which.Order = NULL, return.Order = FALSE, draw.nonlbl = TRUE, cex.nonlbl = 0.3, pch.nonlbl = ".", withSubst = TRUE)
cniperPoint(L2Fam, neighbor, risk, lower, upper)
cniperPointPlot(L2Fam, data = NULL, ..., neighbor, risk = asMSE(), lower = getdistrOption("DistrResolution"), upper = 1 - getdistrOption("DistrResolution"), n = 101, withMaxRisk = TRUE, scaleX = FALSE, scaleX.fct, scaleX.inv, scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv = qnorm, scaleN = 9, x.ticks = NULL, y.ticks = NULL, cex.pts = 1, cex.pts.fun = NULL, col.pts = par("col"), pch.pts = 19, jit.fac = 1, jit.tol = .Machine$double.eps, with.lab = FALSE, lab.pts = NULL, lab.font = NULL, alpha.trsp = NA, which.lbs = NULL, which.Order = NULL, return.Order = FALSE, draw.nonlbl = TRUE, cex.nonlbl = 0.3, pch.nonlbl = ".", withSubst = TRUE)IC IC L2ParamFamily Neighborhood RiskType plot). lower and upperTRUE, for risk comparison
uses the maximal risk of the classically optimal IC $psi$ in all
situations with contamination in Dirac points 'no larger' than
the respective evaluation point and the optimally-robust
IC $eta$ at its least favorable contamination situation
('over all real Dirac contamination points'). This is the default and
was the behavior prior to package version 0.9).
If FALSE it uses exactly the situation
with Dirac contamination in the evaluation point for both ICs
$psi$ and $eta$ which amounts to calling cniperCont
with IC1=psi, IC2=eta.scaleX is TRUE and scaleX.fct is
missing, the cdf of the underlying observation distribution.scale.fct, i.e., an isotone,
vectorized function mapping [0,1] to the domain of the IC(s)
such that for any x in the domain,
scaleX.inv(scaleX.fct(x))==x; if scaleX is TRUE
and scaleX.inv is
missing, the quantile function of the underlying observation distribution.NULL (default), then log(1+abs(x)) is used for
the rescaling, or a function which is then used for the
rescaling.NULL
observation indices;col.pch and col.lbl; if one-dim and NA all colors are
left unchanged. Otherwise, with usual recycling rules alpha.trsp
gets shorted/prolongated to length the data-symbols to be plotted.
Coordinates of this vector alpha.trsp with NA are left unchanged,
while for the remaining ones, the alpha channel in rgb space is set
to the respective coordinate value of alpha.trsp. The non-NA
entries must be integers in [0,255] (0 invisible, 255 opaque).DiscreteDistribution
for plotting points of the second argument in a jittered fashion.DiscreteDistribution
for plotting points of the second argument in a jittered fashion.NULL --- then no observation is excludednormtype(object); then which.Order
either is an integer vector with the indices of the ordered
observations (remaining after a possible reduction by argument which.lbs)
to be plotted into graph or NULL --- then no (further) observation
is excluded.TRUE, an order vector
is returned; more specifically, the order of the (remaining) observations
given by their original index is returned (remaining means: after a possible
reduction by argument which.lbs, and ordering is according to the norm given by
normtype(object));
otherwise we return invisible() as usual.TRUE (default) pattern substitution for
titles and lables is used; otherwise no substitution is used. cniperCont the difference between the risks of two ICs
is plotted. The function cniperPoint can be used to determine cniper
points. That is, points such that the optimally robust estimator
has smaller minimax risk than the classical optimal estimator under
contamination with Dirac measures at the cniper points.
As such points might be difficult to find, we provide the
function cniperPointPlot which can be used to obtain a plot
of the risk difference; in this function the usual arguments for
plot can be used. For arguments col, lwd,
vectors can be used; then the first coordinate is taken for the
curve, the second one for the balancing line. For argument lty,
a list can be used; its first component is then taken for the
curve, the second one for the balancing line.
If argument withSubst is TRUE, in all title
and axis lable arguments of cniperCont and cniperPointPlot,
the following patterns are substituted:
For more details about cniper contamination and cniper points we refer to Section~3.5 of Kohl et al. (2008) as well as Ruckdeschel (2004) and the Introduction of Kohl (2005).
Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
Ruckdeschel, P. (2004). Higher Order Asymptotics for the MSE of M-Estimators on Shrinking Neighborhoods. Unpublished Manuscript.
## cniper contamination
P <- PoisFamily(lambda = 4)
RobP1 <- InfRobModel(center = P, neighbor = ContNeighborhood(radius = 0.1))
IC1 <- optIC(model=RobP1, risk=asMSE())
RobP2 <- InfRobModel(center = P, neighbor = ContNeighborhood(radius = 1))
IC2 <- optIC(model=RobP2, risk=asMSE())
cniperCont(IC1 = IC1, IC2 = IC2,
neighbor = ContNeighborhood(radius = 0.5),
risk = asMSE(),
lower = 0, upper = 8, n = 101)
## cniper point plot
cniperPointPlot(P, neighbor = ContNeighborhood(radius = 0.5),
risk = asMSE(), lower = 0, upper = 10)
## Don't run to reduce check time on CRAN
## Not run:
# ## cniper point
# cniperPoint(P, neighbor = ContNeighborhood(radius = 0.5),
# risk = asMSE(), lower = 0, upper = 4)
# cniperPoint(P, neighbor = ContNeighborhood(radius = 0.5),
# risk = asMSE(), lower = 4, upper = 8)
# ## End(Not run)
Run the code above in your browser using DataLab