huberwgt: Huber M-estimators of the weighted mean and weighted total

Description Usage Arguments Details Value Utility functions Note References See Also Examples

Description

Weighted Huber M-estimators of the mean and total are available in two forms:

Usage

1
2
3
4
5
6
7
8
9
weighted_mean_huber(x, w, k = 1.5, type = "rht", info = FALSE,
  na.rm = FALSE, ...)

weighted_total_huber(x, w, k = 1.5, type = "rht", info = FALSE,
  na.rm = FALSE, ...)

svymean_huber(x, design, k = 1.5, type = "rht", ...)

svytotal_huber(x, design, k = 1.5, ...)

Arguments

x

a numeric vector (weighted.[total/mean].huber or weighted.[total/mean].huber); a formula object or variable name (svymean_huber or svytotal_huber)

w

a numeric vector of weights

k

a robustness tuning constant, k in [0, ∞)

type

type of estimator: "rht" (default) or "rwm"

info

logical (default: FALSE); if TRUE further estimation details are returned

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

...

additional arguments passed to the control object (see rht_control)

design

a survey.design object (see svydesign in survey)

Details

Overview

Robust M-estimator of the Horvitz–Thompson total or the Hajek mean

  • bare-bone functions: return the estimate (no variance estimation)

  • estimation methods on the basis of survey (incl. variance estimation)

Type

Two types of estimation methods are available:

rht

(robust) Horvitz-Thompson M-estimator of the total/mean

rwm

(robust) weighted mean estimator of a Hajek-type estimator of the mean.

If the study variable x is positively correlated with the inclusion probabilities, type "rht" tends to be superior.

Scale

M-estimators of location are not scale invariant. The unknown scale is estimated simultaneously with the estimate of location (mean or total) as the weighted median absolute deviation from the weighted median (MAD, see weighted_mad).

Variance

Variance estimates of the mean or total estimator are computed as first-order linearization using the design-based-estimation capabilities available in package survey.

Tuning

Additional arguments can be passed (via ...) to specify the control parameters (e.g. number of iterations, psi-function, etc.); see rht_control for details.

Domain estimation

Estimates for domains can be obtained using the svyby wrapper in the survey package (see examples).

Value

Utility functions

For the methods svymean_huber and svytotal_huber, the following utility functions can be used

Note

huberwgt is a generic name for the functions documented.

References

Hulliger, B. (1995). Outlier Robust Horvitz-Thompson Estimators, Survey Methodology 21(1): 79-87.

See Also

svymean_trimmed, svytotal_trimmed, svymean_winsorized, svytotal_winsorized, weighted_mean_trimmed, weighted_total_trimmed weighted_mean_winsorized, weighted_total_winsorized

Examples

1
2
3
4
5
6
library(survey)
data(api)
dstrat <- svydesign(id=~1, strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
svymean_huber(~api00, dstrat, k = 2)
# Domain estimates
svyby(~api00, by = ~stype, design = dstrat, svymean_huber, k = 1.34)

martinSter/robsurvey documentation built on Oct. 11, 2019, 4:45 p.m.