statsmodels/statsmodels — pull request #648 by VirgileFritsch (2013-02-05 17:01:48+00:00)
Title: BF: Make RLM stick to Huber's description

As discussed some months ago on the mailing list, there are two points that make RLM impossible to use exactly as Huber mentioned in his book [1]:

- There should be possible to use a use-defined HuberScale object within the RLM fit. Although statsmodels' API allows it, it is in fact not the case since the BuerScale object is redefined each time (call to `scale.scale_est` instead of the user one: `self.scale_est`)
- At each iteration of the IRLS algorithm, there is a one-step update formula for the scale, derived from the weight function that is used. The one-step formula is described in section 7.8.1 of the book and can be seen in statsmodels as a particular fit of a HuberScale object, with `maxiter=2` (indeed, there will be only one loop execution within the scale computation, which correspond to the one-step formula). The problem is that convergence is required for the scale computation within that HuberScale call, whereas we do not necessarily expect it in our case.

[1] P.J.Huber, E.M.Ronchetti, Robust Statistics, Second Edition, Wiley 2009