weighted-m-estimator {robsurvey}R Documentation

Weighted Huber and Tukey Mean and Total (bare-bone functions)

Description

Weighted Huber and Tukey M-estimator of the mean and total (bare-bone function with limited functionality; see svymean_huber, svymean_tukey, svytotal_huber, and svytotal_tukey for more capable methods)

Usage

weighted_mean_huber(x, w, k, type = "rwm", asym = FALSE, info = FALSE,
                    na.rm = FALSE, verbose = TRUE, ...)
weighted_total_huber(x, w, k, type = "rwm", asym = FALSE, info = FALSE,
                     na.rm = FALSE, verbose = TRUE, ...)
weighted_mean_tukey(x, w, k, type = "rwm", info = FALSE, na.rm = FALSE,
                    verbose = TRUE, ...)
weighted_total_tukey(x, w, k, type = "rwm", info = FALSE, na.rm = FALSE,
                     verbose = TRUE, ...)

Arguments

x

[numeric vector] data.

w

[numeric vector] weights (same length as x).

k

[double] robustness tuning constant (0 < k \leq \infty).

type

[character] type of method: "rwm" or "rht"; see below (default: "rwm").

asym

[logical] toggle for asymmetric Huber psi-function (default: FALSE).

info

[logical] indicating whether additional information should be returned (default: FALSE).

na.rm

[logical] indicating whether NA values should be removed before the computation proceeds (default: FALSE).

verbose

[logical] indicating whether additional information is printed to the console (default: TRUE).

...

additional arguments passed to the method (e.g., maxit: maxit number of iterations, etc.).

Details

Characteristic.

Population mean or total. Let \mu denote the estimated population mean; then, the estimated total is given by \hat{N} \mu with \hat{N} =\sum w_i, where summation is over all observations in the sample.

Type.

Two methods/types are available for estimating the location \mu:

type = "rwm" (default):

robust weighted M-estimator of the population mean and total, respectively. This estimator is recommended for sampling designs whose inclusion probabilities are not proportional to some measure of size. [Legacy note: In an earlier version, the method type = "rwm" was called "rhj"; the type "rhj" is now silently converted to "rwm"]

type = "rht":

robust Horvitz-Thompson M-estimator of the population mean and total, respectively. This estimator is recommended for proportional-to-size sampling designs.

Variance estimation.

See the related but more capable functions:

Psi-function.

By default, the Huber or Tukey psi-function are used in the specification of the M-estimators. For the Huber estimator, an asymmetric version of the Huber psi-function can be used by setting the argument asym = TRUE in the function call.

Value

The return value depends on info:

info = FALSE:

estimate of mean or total [double]

info = TRUE:

a [list] with items:

  • characteristic [character],

  • estimator [character],

  • estimate [double],

  • variance (default: NA),

  • robust [list],

  • residuals [numeric vector],

  • model [list],

  • design (default: NA),

  • [call]

Failure of convergence

By default, the method assumes a maximum number of maxit = 100 iterations and a numerical tolerance criterion to stop the iterations of tol = 1e-05. If the algorithm fails to converge, you may consider changing the default values; see svyreg_control.

References

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

See Also

Overview (of all implemented functions)

Examples

head(workplace)

# Robust Horvitz-Thompson M-estimator of the population total
weighted_total_huber(workplace$employment, workplace$weight, k = 9,
    type = "rht")

# Robust weighted M-estimator of the population mean
weighted_mean_huber(workplace$employment, workplace$weight, k = 12,
    type = "rwm")

[Package robsurvey version 0.6 Index]