MDEstimator {distrMod}R Documentation

Function to compute minimum distance estimates

Description

The function MDEstimator provides a general way to compute minimum distance estimates.

Usage

MDEstimator(x, ParamFamily, distance = KolmogorovDist, dist.name, 
            startPar = NULL,  Infos, trafo = NULL, 
            penalty = 0, asvar.fct, ...)

Arguments

x (empirical) data
ParamFamily object of class "ParamFamily"
distance (generic) function: to compute distance beetween (emprical) data and objects of class "Distribution".
dist.name optional name of distance
startPar initial information used by optimize resp. optim; i.e; if (total) parameter is of length 1, startPar is a search interval, else it is an initial parameter value; if NULL slot startPar of ParamFamily is used to produce it; in the multivariate case, startPar may also be of class Estimate, in which case slot untransformed.estimate is used.
Infos character: optional informations about estimator
trafo an object of class MatrixorFunction – a transformation for the main parameter
penalty (non-negative) numeric: penalizes non valid parameter-values
asvar.fct optionally: a function to determine the corresponding asymptotic variance; if given, asvar.fct takes arguments L2Fam((the parametric model as object of class L2ParamFamily)) and param (the parameter value as object of class ParamFamParameter); arguments are called by name; asvar.fct may also process further arguments passed through the ... argument
... further arguments to criterion or optimize or optim, respectively.

Details

The argument distance has to be a (generic) function with arguments the empirical data as well as an object of class "Distribution" and possibly ...; e.g. KolmogorovDist (default), TotalVarDist or HellingerDist. Uses mceCalc for method dispatch.

Value

An object of S4-class "MCEstimate" which inherits from class "Estimate".

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de,
Peter Ruckdeschel Peter.Ruckdeschel@itwm.fraunhofer.de

References

Huber, P.J. (1981) Robust Statistics. New York: Wiley.

Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.

See Also

ParamFamily-class, ParamFamily, MCEstimator, \code{MCEstimate-class}, fitdistr

Examples

## (empirical) Data
x <- rgamma(50, scale = 0.5, shape = 3)

## parametric family of probability measures
G <- GammaFamily(scale = 1, shape = 2)

## Kolmogorov(-Smirnov) minimum distance estimator
MDEstimator(x = x, ParamFamily = G, distance = KolmogorovDist)

## von Mises minimum distance estimator with default mu
MDEstimator(x = x, ParamFamily = G, distance = CvMDist)

## von Mises minimum distance estimator with default mu
MDEstimator(x = x, ParamFamily = G, distance = CvMDist,
            asvar.fct = distrMod:::.CvMMDCovariance)
#*** variance routine is still in testing phase so not yet
#*** exported to namespace
## von Mises minimum distance estimator with mu = N(0,1)
MDEstimator(x = x, ParamFamily = G, distance = CvMDist, mu = Norm())

## Total variation minimum distance estimator
## gamma distributions are discretized
MDEstimator(x = x, ParamFamily = G, distance = TotalVarDist)
## or smoothing of emprical distribution (takes some time!)
#MDEstimator(x = x, ParamFamily = G, distance = TotalVarDist, asis.smooth.discretize = "smooth")

## Hellinger minimum distance estimator
## gamma distributions are discretized
distroptions(DistrResolution = 1e-10)
MDEstimator(x = x, ParamFamily = G, distance = HellingerDist, startPar = c(1,2))
distroptions(DistrResolution = 1e-6) # default
## or smoothing of emprical distribution (takes some time!)
#MDEstimator(x = x, ParamFamily = G, distance = HellingerDist, asis.smooth.discretize = "smooth")

[Package distrMod version 2.0.7 Index]