weights() extracts robustness weights or fitting
(or prior) weights from a lmrob or glmrob object.
# S3 method for lmrob
weights(object, type = c("prior", "robustness", "working"), ...)# S3 method for glmrob
weights(object, type = c("prior", "robustness", "working"), ...)
Weights extracted from the object object.
an object of class "lmrob" or "glmrob", typically the
result of a call to lmrob, or glmrob,
respectively.
the type of weights to be returned. Either
"prior" (default), "robustness", or "working";
working weights for lmrob objects are the product of the
prior (often all \( = 1\)) and the robustness weights.
For glmrob objects, they currently are the same as the
"robustness" ones
not used currently.
Manuel Koller and Martin Maechler.
The “prior weights” correspond to the weights specified using
the “weights” argument when calling lmrob. The
“robustness weights” are the weights assigned by the
M-estimator of regression, \(\psi(r_i/S) / (r_i/S)\). The robust
coefficient estimate then numericarlly corresponds to a weighted least
squares fit using the product of both types of weights as weights;
these are also called “working weights”, and are available as
weights(<lmrob>, type = "working").
lmrob, glmrob and weights