The Python package statsmodels comes with robust models of linear regression (RLM, https://www.statsmodels.org/stable/rlm.html). And the R package robustbase provides robust GLMs (glmrob, https://www.rdocumentation.org/packages/robustbase/versions/0.95-0/topics/glmrob).

My question is: When reducing to the default parameters, and choosing family="gaussian" (with identity as the link function) as well as method="Mqle" in glmrob, what is the difference to the statsmodels approach RLM with the default HuberT norm? Also: Is there a set of parameters so that the two implementations will do the same thing?

I noticed that the two functions produce different results, and found it quite hard to dig into the source code myself because I'm not very familiar with robust statistical methods in general. Intuitively, I would have assumed that the robust GLM agrees with RLM when the link function is the identity and the distribution is "gaussian", but that doesn't seem to be the case.

Even though this question sounds like a pure software question, I think it isn't because you could also frame it like this: Does the model proposed in Cantoni & Ronchetti 2001 (https://www.tandfonline.com/doi/abs/10.1198/016214501753209004) agree with the classical robust Huber estimator when assuming normal distributions and the identity as the link function? If not, where exactly is the difference, and which modifications are necessary to obtain the same estimator?


1 Answer 1


Canton and Ronchetti include a Mallows type weighting to remove influential or outlier x points (explanatory variables).
So, Cantoni and Ronchetti's method is robust to both types of outliers.

Standard Huber M-estimation which is implemented in statsmodels RLM, only downweighs outlier in y space, i.e. large residuals, but is not robust to outliers and influential points in the explanatory variables.

  • $\begingroup$ Thanks for your response! Would it be possible to select a set of parameters for glmrob so that the resulting model is identical with some set of parameters for rlm? $\endgroup$
    – pytony
    Sep 14, 2022 at 17:04
  • $\begingroup$ I never used glmrob. The documentation shows a weights.on.x option. If weights are ones, then the x-outliers are not downweighted, i.e. no Mallows weights are used. $\endgroup$
    – Josef
    Sep 15, 2022 at 13:22
  • $\begingroup$ The default value of weights.on.x is "none" according to the documentation, so x-outliers shouldn't be downweighted at all unless otherwise specified by the user, right? This puzzles me because, as I said in my original post, the results of glmrob do differ from the results of rlm with the default parameter set and the gaussian family. $\endgroup$
    – pytony
    Sep 16, 2022 at 9:16
  • $\begingroup$ My answer was about main difference between statsmodels RLM and Cantoni Ronchetti. I don't know how glmrob computes the scale (residual variance) for Gaussian and Gamma families. Default in RLM is MAD. $\endgroup$
    – Josef
    Sep 16, 2022 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.