How it works...
Conceptually, we want to minimize the sum of the residuals, but weighting them in such a way that large residuals receive a small weight (so their influence is mitigated). We can think that in OLS (ordinary least squares), every observation has a weight of 1. Huber and bi-square weighting penalize each residual by assigning a small weight. The rlm function works by minimizing the sum of weighted residuals. The problem is that the weights depend on the residuals, and the residuals depend on the weights. The technique that is used for this is called iteratively reweighted least squares. Large residuals receive a large weight, and small residuals get a small one.
The specific weight depends on which weighting scheme is used. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access