wgt_functions {robsurvey}R Documentation

Weight Functions (for the M- and GM-Estimators)

Description

Weight functions associated with the Huber and the Tukey biweight psi-functions; and the weight function of Simpson et al. (1992) for GM-estimators.

Usage

huberWgt(x, k = 1.345)
tukeyWgt(x, k = 4.685)
simpsonWgt(x, a, b)

Arguments

x

[numeric vector] data.

k

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

a

[double] robustness tuning constant (0 \leq a \leq \infty); see details below.

b

[double] robustness tuning constant (0 < b \leq \infty; see details below.

Details

The functions huberWgt and tukeyWgt return the weights associated with the respective psi-function.

The function simpsonWgt is used (in regression GM-estimators) to downweight leverage observations (i.e., outliers in the model's design space). Let d_i denote the (robust) squared Mahalanobis distance of the i-th observation. The Simpson et al. (1992) type of weight is defined as \min \{1, (b/d_i)^{a/2}\}, where a and b are tuning constants.

Value

Numerical vector of weights

References

Simpson, D. G., Ruppert, D. and Carroll, R.J. (1992). On One-Step GM Estimates and Stability of Inferences in Linear Regression. Journal of the American Statistical Association 87, 439–450. doi:10.2307/2290275

See Also

Overview (of all implemented functions)

svyreg_huberM, svyreg_huberGM, svyreg_tukeyM and svyreg_tukeyGM

Examples

head(flour)

# standardized distance from median (copper content in wholemeal flour)
x <- flour$copper
z <- abs(x - median(x)) / mad(x)

# plot of weight functions vs. distance
plot(z, huberWgt(z, k = 3), ylim = c(0, 1), xlab = "distance",
     ylab = "weight")
points(z, tukeyWgt(z, k = 6), pch = 2, col = 2)
points(z, simpsonWgt(z, a = Inf, b = 3), pch = 3, col = 4)
legend("topright", c("huberWgt(k = 3)", "tukeyWgt(k = 6)",
       "simpsonWgt(a = Inf, b = 3)"), pch = 1:3, col = c(1, 2, 4))

[Package robsurvey version 0.6 Index]