a: [double] robustness tuning constant (0<=a<=Inf); see details below.
b: [double] robustness tuning constant (0<b<=Inf; 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.
By default, a = 1; this choice implies that the weights are computed on the basis of the robust Mahalanobis distances. Alternative: a = Inf implies a weight of zero for all observations whose (robust) squared Mahalanobis is larger than b.
The tuning constants b is a threshold on the distances.
Returns
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. tools:::Rd_expr_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. distanceplot(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))