| svyreg_tukeyM {robsurvey} | R Documentation |
Tukey Biweight Robust Survey Regression M- and GM-Estimator
Description
svyreg_tukeyM and svyreg_tukeyGM compute, respectively,
a survey weighted M- and GM-estimator of regression using
the biweight Tukey psi-function.
Usage
svyreg_tukeyM(formula, design, k, var = NULL, na.rm = FALSE, verbose = TRUE,
...)
svyreg_tukeyGM(formula, design, k, type = c("Mallows", "Schweppe"),
xwgt, var = NULL, na.rm = FALSE, verbose = TRUE, ...)
Arguments
formula |
a |
design |
an object of class |
k |
|
var |
a one-sided |
na.rm |
|
verbose |
|
... |
additional arguments passed to the method (e.g., |
type |
|
xwgt |
|
Details
Package survey must be attached to the search path in order to use
the functions (see library or require).
svyreg_tukeyM and svyreg_tukeyGM compute, respectively,
M- and GM-estimates of regression by iteratively re-weighted least
squares (IRWLS). The estimate of regression scale is (by default)
computed as the (normalized) weighted median of absolute deviations
from the weighted median (MAD; see weighted_mad) for
each IRWLS iteration. If the weighted MAD is zero (or nearly so),
the scale is computed as the (normalized) weighted
interquartile range (IQR).
- M-estimator
-
The regression M-estimator
svyreg_tukeyMis robust against residual outliers (granted that the tuning constantkis chosen appropriately). - GM-estimator
-
Function
svyreg_huberGMimplements the Mallows and Schweppe regression GM-estimator (see argumenttype). The regression GM-estimators are robust against residual outliers and outliers in the model's design space (leverage observations; see argumentxwgt). - Numerical optimization
-
See
svyreg_control. - Models
-
Models for
svyreg_robare specified symbolically. A typical model has the formresponse ~ terms, whereresponseis the (numeric) response vector andtermsis a series of terms which specifies a linear predictor forresponse; seeformulaandlm.A formula has an implied intercept term. To remove this use either
y ~ x - 1ory ~ 0 + x; seeformulafor more details of allowed formulae.
Value
Object of class svyreg.rob
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.
See Also
Overview (of all implemented functions)
summary, coef,
residuals, fitted,
SE and vcov
plot for regression diagnostic plot methods.
Other robust estimating methods svyreg_huberM and
svyreg_huberGM
Examples
head(workplace)
library(survey)
# Survey design for stratified simple random sampling without replacement
dn <- if (packageVersion("survey") >= "4.2") {
# survey design with pre-calibrated weights
svydesign(ids = ~ID, strata = ~strat, fpc = ~fpc, weights = ~weight,
data = workplace, calibrate.formula = ~-1 + strat)
} else {
# legacy mode
svydesign(ids = ~ID, strata = ~strat, fpc = ~fpc, weights = ~weight,
data = workplace)
}
# Compute regression M-estimate with Tukey bisquare psi-function
m <- svyreg_tukeyM(payroll ~ employment, dn, k = 8)
# Regression inference
summary(m)
# Extract the coefficients
coef(m)
# Extract variance/ covariance matrix
vcov(m)
# Diagnostic plots (e.g., standardized residuals against fitted values)
plot(m, which = 1L)
# Plot of the robustness weights of the M-estimate against its residuals
plot(residuals(m), robweights(m))