robsurvey

Outlier-resistant survey estimation with R (joint work with Beat Hulliger and Martin Sterchi)

CRAN CRAN

Summary

The package robsurvey implements the following methods for outlier-resistant regression, and the robust estimation of the population total and mean for finite populations:
  • weighted robust regression (M- and GM-estimators)
  • model-assisted estimation,
    • robust generalized regression estimation (special case: robust ratio estimation),
    • robust calibration estimation,
  • robust Horvitz--Thompson and Hajek estimation,
  • basic robust estimators using weight reduction, trimming and winsorization.
A key design pattern of the package is that the majority of the estimating methods is available in two "flavors": bare-bone functions and survey estimation methods. Bare-bone functions are stripped-down versions of the survey methods in terms of functionality and informativeness. These functions may serve users and other package developers as building blocks. In particular, bare-bone functions cannot compute variances. The survey methods are much more capable and depend, for variance estimation, on the R package survey (Lumley, 2004, 2010).



Implemented methods

Basic robust estimators

  • weight reduction methods (Dalen's estimator)
  • winsorized mean and total
  • trimmed mean and total
  • Robust Horvitz-Thompson and Hajekt estimator of the mean and total
The signatures of the bare-bone functions for estimating the population total and mean are composed of the prefixes weighted_mean_ or weighted_total_ and one of the suffixes (methods):
  • dalen(x, w, censored, na.rm = FALSE, verbose = TRUE, info = FALSE
  • trimmed(x, w, LB = 0.05, UB = 1 - LB, info = FALSE, na.rm = FALSE)
  • winsorized(x, w, LB = 0.05, UB = 1 - LB, info = FALSE, na.rm = FALSE)
  • k_winsorized(x, w, k, na.rm = FALSE, simple_var = FALSE)
  • huber(x, w, k, type = "rwm", na.rm = FALSE)
  • tukey(x, w, k, type = "rwm", na.rm = FALSE)
where x is a numeric variable and w is the weight.
The signatures of the survey functions are composed of the prefixes svymean_ or svyotal_ and one of the suffixes (methods):
  • dalen(x, design, censored, na.rm = FALSE, verbose = TRUE, info = FALSE
  • trimmed(x, design, LB = 0.05, UB = 1 - LB, info = FALSE, na.rm = FALSE)
  • winsorized(x, design, LB = 0.05, UB = 1 - LB, info = FALSE, na.rm = FALSE)
  • k_winsorized(x, design, k, na.rm = FALSE, simple_var = FALSE)
  • huber(x, design, k, type = "rwm", na.rm = FALSE)
  • tukey(x, design, k, type = "rwm", na.rm = FALSE)
where x is a formula object, and design is a design object (see documentation).

Robust weighted regression

  • M-estimator (Huber or Tukey biweight psi-function)
  • GM-estimator (Mallows and Schweppe type; Huber or Tukey biweight psi-function)
The signatures of the weighted regression M- and GM-estimators are composed of the prefix svyreg_ and one of the suffixes / methods:
  • huberM(formula, design, k, var = NULL, na.rm = FALSE, ...)
  • huberGM(formula, design, k, type, xwgt, var = NULL, na.rm = FALSE, ...)
  • tukeyM(formula, design, k, var = NULL, na.rm = FALSE, ...)
  • tukeyGM(formula, design, k, type, xwgt, var = NULL, na.rm = FALSE, ...)
where x is a formula object, design is a design object (see documentation), and type is "mallows" or "schweppe".

Robust generalized regression estimator (GREG)

The functions for the (robust) GREG (incl. ratio estimation) are:
  • svymean_reg(object, mean_auxiliary, type, k, ...)
  • svytotal_reg(object, total_auxiliary, type, k, ...)
where object is an estimated regression model, and type specifies one of the following GREG types: "projective", "ADU", "robust", "lee", "BR" or "duchesne"; see package documentation for more details.



Code respository






References

  • LUMLEY, T. (2004). Analysis of complex survey samples. Journal of Statistical Software 9, 1-19. DOI 10.18637/jss.v009.i08
  • LUMLEY (2010). Complex Surveys: A Guide to Analysis Using R. John Wiley and Sons.