showdown: Estimator Showdown by Monte-Carlo Study.

View source: R/showdown.R

showdownR Documentation

Estimator Showdown by Monte-Carlo Study.

Description

The function showdown can be used to perform Monte-Carlo studies comparing a competitor with rmx estimators in case of normal location and scale. In addition, maximum likelihood (ML) estimators (mean and sd) and median and MAD are computed. The comparison is based on the empirical MSE.

Usage

showdown(n, M, eps, contD, seed = 123, estfun, estMean, estSd,
         eps.lower = 0, eps.upper = 0.05, steps = 3L, fsCor = TRUE, 
         plot1 = FALSE, plot2 = FALSE, plot3 = FALSE)

Arguments

n

integer; sample size, should be at least 3.

M

integer; Monte-Carlo replications.

eps

amount of contamination in [0, 0.5].

contD

object of class "UnivariateDistribution"; contaminating distribution.

seed

random seed.

estfun

function to compute location and scale estimator; see details below.

estMean

function to compute location estimator; see details below.

estSd

function to compute scale estimator; see details below.

eps.lower

used by rmx estimator.

eps.upper

used by rmx estimator.

steps

integer; steps used for estimator construction.

fsCor

logical; use finite-sample correction.

plot1

logical; plot cdf of ideal and real distribution.

plot2

logical; plot 20 (or M if M < 20) randomly selected samples.

plot3

logical; generate boxplots of the results.

Details

Normal location and scale with mean = 0 and sd = 1 is used as ideal model (without restriction due to equivariance).

Since there is no estimator which yields reliable results if 50 percent or more of the observations are contaminated, we use a modification where we re-simulate all samples including at least 50 percent contaminated data.

If estfun is specified it has to compute and return a location and scale estimate (vector of length 2). One can also specify the location and scale estimator separately by using estMean and estSd where estMean computes and returns the location estimate and estSd the scale estimate.

We use funtion rowRoblox for the computation of the rmx estimator.

Value

Data.frame including empirical MSE (standardized by sample size n) and relMSE with respect to the rmx estimator.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

References

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.

See Also

rowRoblox

Examples

library(MASS)
## compare with Huber's Proposal 2
showdown(n = 20, M = 100, eps = 0.02, contD = Norm(mean = 3, sd = 3), 
         estfun = function(x){ unlist(hubers(x)) },
         plot1 = TRUE, plot2 = TRUE, plot3 = TRUE)

## compare with Huber M estimator with MAD scale
showdown(n = 20, M = 100, eps = 0.02, contD = Norm(mean = 3, sd = 3), 
         estfun = function(x){ unlist(huber(x)) },
         plot1 = TRUE, plot2 = TRUE, plot3 = TRUE)

RobLox documentation built on Feb. 4, 2024, 3 p.m.

Related to showdown in RobLox...