ifPlot | R Documentation |
The function ifPlot
plots the influence function (IF) of
estimators.
ifPlot(x, ...)
## S3 method for class 'rmx'
ifPlot(x, add.cniper = TRUE, color.cniper = "#E18727",
add.outlier = TRUE, prob.outlier = 0.001,
color.outlier = "#BC3C29",
range.alpha = 1e-6, range.n = 501,
info.digits = 2, param.digits = 2,
ggplot.xlab = "x", ggplot.ylab = "IF(x)",
ggplot.ggtitle = NULL,
point.col = "#0072B5", point.alpha = 0.4,
point.length.out = 5, point.range = c(1,7),
plot = TRUE, ...)
x |
object of S3 class |
add.cniper |
logical: add cniper region; see also |
color.cniper |
color used for cniper region. |
add.outlier |
logical: add outlier region; see also |
prob.outlier |
probability used to define outlier region; see also
|
color.outlier |
color used for outlier region. |
range.alpha |
alpha-quantile used to compute plot range, which is from
|
range.n |
number of points in the alpha-quantile range, generated by
function |
info.digits |
number of digits shown for |
param.digits |
number of digits used for the estimated parameter values, if
default |
ggplot.xlab |
label(s) of x-axis, recycled if length is equal to 1 and more than 1 parameter has been estimated. |
ggplot.ylab |
label(s) of y-axis, recycled if length is equal to 1 and more than 1 parameter has been estimated. |
ggplot.ggtitle |
if |
point.col |
single color used for colouring the data points. |
point.alpha |
alpha used for color shading. |
point.length.out |
number of point sizes used to visualize the absolut/total
information assigned to a data point; see argument
|
point.range |
a numeric vector of length 2 specifing the minimum and maximum
size of the data points; see argument
|
plot |
if |
... |
further arguments passed through. |
The function is inspired by the plot
-methods and function PlotIC
of the RobASt-family of packages.
In case of optimally-robust RMX estimators computed with function rmx
(S3 class rmx
), the influence function is plotted in combination with
the data that was used to compute the estimator. The point size is proportional
to the absolute/total information (= length of the IF squared) attributed to
each point.
Invisible object of class ggplot
or a list of ggplot
objects.
Matthias Kohl Matthias.Kohl@stamats.de
Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.
Rieder, H., Kohl, M. and Ruckdeschel, P. (2008) The Costs of not Knowing the Radius. Statistical Methods and Applications 17(1) 13-40. Extended version: http://r-kurs.de/RRlong.pdf
M. Kohl, P. Ruckdeschel, and H. Rieder (2010). Infinitesimally Robust Estimation in General Smoothly Parametrized Models. Statistical Methods and Application, 19(3):333-354.
rmx
, optIF
ind <- rbinom(100, size=1, prob=0.05)
x <- rnorm(100, mean=ind*3, sd=(1-ind) + ind*3)
res <- rmx(x, eps.lower = 0.01, eps.upper = 0.1)
ifPlot(res)
## plot-method
plot(res, which = 1)
## setting and passing argument
ifPlot(res, ggplot.xlab = "data", ggplot.ylab = "influence",
ggplot.ggtitle = c("Location part of RMX-IF",
"Scale part of RMX-IF"))
plot(res, which = 1,
control = list(ifPlot = list(ggplot.xlab = "data",
ggplot.ylab = "influence",
ggplot.ggtitle = c("Location part of RMX-IF",
"Scale part of RMX-IF"))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.