mer {robsurvey} | R Documentation |
Minimum Estimated Risk (MER) M-Estimator
Description
mer
is an adaptive M-estimator of the weighted mean or total. It
is defined as the estimator that minimizes the estimated mean square error,
mse
, of the estimator under consideration.
Usage
mer(object, verbose = TRUE, max_k = 10, init = 1, method = "Brent",
optim_args = list())
Arguments
object |
an object of class |
verbose |
|
init |
|
method |
|
max_k |
|
optim_args |
|
Details
Package survey must be attached to the search path in order to use
the functions (see library
or require
).
MER-estimators are available for the methods svymean_huber
,
svytotal_huber
, svymean_tukey
and
svytotal_tukey
.
Value
Object of class svystat_rob
References
Hulliger, B. (1995). Outlier Robust Horvitz-Thompson Estimators. Survey Methodology 21, 79–87.
See Also
Overview (of all implemented functions)
Examples
head(losdata)
library(survey)
# Survey design for simple random sampling without replacement
dn <- if (packageVersion("survey") >= "4.2") {
# survey design with pre-calibrated weights
svydesign(ids = ~1, fpc = ~fpc, weights = ~weight, data = losdata,
calibrate.formula = ~1)
} else {
# legacy mode
svydesign(ids = ~1, fpc = ~fpc, weights = ~weight, data = losdata)
}
# M-estimator of the total with tuning constant k = 8
m <- svymean_huber(~los, dn, type = "rhj", k = 8)
# MER estimator
mer(m)