Function LDEstimator
provides a general way to compute
estimates for a given parametric family of probability measures
(with a scale and shape parameter) which
can be obtained by matching location and dispersion functionals
against empirical counterparts.
LDEstimator(x, loc.est, disp.est, loc.fctal, disp.fctal, ParamFamily,
loc.est.ctrl = NULL, loc.fctal.ctrl=NULL,
disp.est.ctrl = NULL, disp.fctal.ctrl=NULL,
q.lo =1e-3, q.up=15, log.q =TRUE,
name, Infos, asvar = NULL, nuis.idx = NULL,
trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE,
..., .withEvalAsVar = FALSE, vdbg = FALSE)
medkMAD(x, ParamFamily, k=1, q.lo =1e-3, q.up=15, nuis.idx = NULL,
trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE,
..., .withEvalAsVar = FALSE, vdbg = FALSE)
medkMADhybr(x, ParamFamily, k=1, q.lo =1e-3, q.up=15, KK = 20, nuis.idx = NULL,
trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE,
..., .withEvalAsVar = FALSE)
medSn(x, ParamFamily, q.lo =1e-3, q.up=10, nuis.idx = NULL,
trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE,
accuracy = 100, ..., .withEvalAsVar = FALSE)
medQn(x, ParamFamily, q.lo =1e-3, q.up=15, nuis.idx = NULL,
trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE,
..., .withEvalAsVar = FALSE)
An object of S4-class "Estimate"
.
(empirical) data
an object of class "ParamFamily"
. The parametric
family at which to evaluate the LDEstimator; the respective
(main) parameter must contain "scale"
and "shape"
.
a function expecting x
(a numeric vector)
as first argument; location estimator.
a function expecting x
(a numeric vector)
as first argument; dispersion estimator; may only take
non-negative values.
a function expecting a distribution object as first argument; location functional.
a function expecting a distribution object as first argument; dispersion functional; may only take non-negative values.
a list (or NULL
); optional additional arguments
for the location estimator.
a list (or NULL
); optional additional arguments
for the dispersion estimator.
a list (or NULL
); optional additional arguments
for the location functional.
a list (or NULL
); optional additional arguments
for the dispersion functional.
numeric; additional parameter for kMAD
; must be positive
and of length 1.
numeric; Maximal number of trials with different k
in
medkMADhybr
.
numeric; lower bound for search intervall in shape parameter.
numeric; upper bound for search intervall in shape parameter.
logical; shall the zero search be done on log-scale?
optional name for estimator.
character: optional informations about estimator
optionally the asymptotic (co)variance of the estimator
optionally the indices of the estimate belonging to nuisance parameter
optionally (numeric) the fixed part of the parameter
an object of class MatrixorFunction
-- a transformation
for the main parameter
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
logical: if TRUE
, the estimator is evaluated at complete.cases(x)
.
numeric: argument to be passed on to Sn
.
further arguments to be passed to location estimator and functional and dispersion estimator and functional.
logical; if TRUE
, debugging information is shown.
logical: shall slot asVar
be evaluated
(if asvar.fct
is given) or
just the call be returned?
Nataliya Horbenko nhorbenko@gmail.com,
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
The arguments loc.est
, disp.est
(location and dispersion estimators)
have to be functions with first argument x
(a numeric vector with the
empirical data) and additional, optional individual arguments to be passed on
in the respective calls as lists loc.est.ctrl
, disp.est.ctrl
,
and global additional arguments through the ...
argument.
Similarly, arguments loc.fctal
, disp.fctal
(location and
dispersion functionals) have to be functions with first argument an
object of class UnivariateDistribution
, and additional, optional
individual arguments to be passed on
in the respective calls as lists loc.fctal.ctrl
, disp.fctal.ctrl
,
and global additional arguments again through the ...
argument.
Uses .LDMatch
internally.
Marazzi, A. and Ruffieux, C. (1999): The truncated mean of asymmetric distribution. Computational Statistics and Data Analysis 32, 79-100.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4), 762-791.
tools:::Rd_expr_doi("10.1080/02331888.2011.628022").
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP --illustrated at scale-shape models. Metrika, 75(8),
1025-1047. tools:::Rd_expr_doi("10.1007/s00184-011-0366-4").
ParamFamily-class
, ParamFamily
,
Estimate-class
## (empirical) Data
set.seed(123)
x <- rgamma(50, scale = 0.5, shape = 3)
## parametric family of probability measures
G <- GammaFamily(scale = 1, shape = 2)
medQn(x = x, ParamFamily = G)
medSn(x = x, ParamFamily = G, q.lo = 0.5, q.up = 4)
# \donttest{
## not tested on CRAN because it takes time...
## without speedup for Sn:
LDEstimator(x, loc.est = median, disp.est = Sn, loc.fctal = median,
disp.fctal = getMethod("Sn","UnivariateDistribution"),
ParamFamily = G, disp.est.ctrl = list(constant=1))
medkMAD(x = x, ParamFamily = G)
medkMADhybr(x = x, ParamFamily = G)
# }
medkMAD(x = x, k=10, ParamFamily = G)
##not at all robust:
LDEstimator(x, loc.est = mean, disp.est = sd,
loc.fctal = E, disp.fctal = sd,
ParamFamily = G)
Run the code above in your browser using DataLab