rmx | R Documentation |
The function rmx
computes optimally robust rmx estimators.
The definition of these estimators can be found in Kohl (2005) and
Rieder et al. (2008), respectively. The other functions are rarely
called directly and are mainly for internal use.
rmx(x, model = "norm", eps.lower=0, eps.upper=NULL, eps=NULL, k = 3L,
initial.est=NULL, fsCor = NULL, na.rm = TRUE, message = TRUE, ...)
rmx.norm(x, eps.lower=0, eps.upper=NULL, eps=NULL, k = 3L,
initial.est=NULL, fsCor = TRUE, na.rm = TRUE, mad0 = 1e-4)
rmx.binom(x, eps.lower=0, eps.upper=NULL, eps=NULL, k = 3L,
initial.est=NULL, fsCor = FALSE, na.rm = TRUE,
size, M = 10000, parallel = FALSE, ncores = NULL,
aUp = 100*size, cUp = 1e4, delta = 1e-9)
## S3 method for class 'rmx'
print(x, digits = getOption("digits"), prefix = " ", ...)
## S3 method for class 'rmx'
summary(object, digits = getOption("digits"), prefix = " ", ...)
## S3 method for class 'rmx'
coef(object, complete = TRUE, ...)
## S3 method for class 'rmx'
vcov(object, ...)
## S3 method for class 'rmx'
plot(x, which = 1,
control = list(ifPlot = NULL, qqPlot = NULL,
ppPlot = NULL, dPlot = NULL,
aiPlot = NULL, riPlot = NULL,
iiPlot = NULL, plot = TRUE), ...)
x |
numeric vector |
object |
object of class |
model |
character: short name of the model/distribution
(default = |
eps.lower |
positive real (0 <= |
eps.upper |
positive real ( |
eps |
positive real (0 < |
k |
positive integer: k-step is used to compute the optimally robust estimator. |
initial.est |
initial estimate for |
fsCor |
|
na.rm |
logical: if |
message |
logical: if |
mad0 |
if |
size |
size parameter (known!); see |
M |
number of Monte-Carlo simulations; see |
parallel |
logical: use package parallel for computations. |
ncores |
if |
aUp |
numeric: upper limit for centering constant a. |
cUp |
postive real: upper limit for clipping constant c. |
delta |
positive real: desired accuracy (convergence tolerance). |
digits |
minimal number of significant digits. |
prefix |
string, passed to |
complete |
logical indicating if the full coefficient vector should
be returned; see |
which |
numeric number from 1 to 7 indicating the plot that shall be generated; see details below. |
control |
list of parameters passed through to the respective plot. |
... |
further arguments passed through; e.g., known parameters such as
|
If the amount of gross errors (contamination) is known, it can be
specified by eps
. The radius of the corresponding infinitesimal
contamination neighborhood is obtained by multiplying eps
by the square root of the sample size.
If the amount of gross errors (contamination) is unknown, try to find a
rough estimate for the amount of gross errors, such that it lies
between eps.lower
and eps.upper
.
If neither eps
nor eps.upper
is provided, eps.upper
will be estimated by applying function outlier
to the RMX estimator
with eps.lower = 0
and eps.upper = 0.5
.
As models we have implemented so far:
"norm"
: normal location (mean) and scale (sd).
"binom"
: binomial probability (prob) with known size.
"pois"
: Poisson mean (lambda).
As plots we have implemented:
ifPlot
: plot of IF.
qqPlot
: qq-plot for fitted model, only implemented
for continuous models.
ppPlot
: pp-plot for fitted model, only implemented
for continuous models.
dPlot
: density plot for fitted model.
aiPlot
: plot of absolute information.
riPlot
: plot of relative information, only implemented
for models where at least two parameters have to be estimated.
iiPlot
: compare absolute information of RMX estimator
with absolute information of ML estimator.
An object of class "rmx"
is returned. It contails at least the
following arguments:
rmxEst |
estimates |
rmxIF |
object of class |
initial.est |
initial estimates. |
Infos |
matrix with information about the estimator |
x |
data used for the estimation. |
n |
sample size |
eps.lower |
lower bound for the amount of gross errors, if provided
otherwise |
eps.upper |
upper bound for the amount of gross errors, if provided
otherwise |
eps |
amount of gross errors, if provided otherwise |
fsCor |
finite-sample correction |
k |
k-step construction |
call |
matched call |
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.
optIF
, rowRmx
, fsRadius
###########################################################
## For more details see vignettes!
###########################################################
## normal location (mean) and scale (sd)
ind <- rbinom(100, size=1, prob=0.05)
x <- rnorm(100, mean=ind*3, sd=(1-ind) + ind*9)
res1 <- rmx(x, eps.lower = 0.01, eps.upper = 0.1)
res1
summary(res1)
confint(res1) # method = "as"
confint(res1, method = "as.bias")
plot(res1, which = 1)
plot(res1, which = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.