1
$\begingroup$

I want to do a regression analysis with a dataset that consists of multiple subgroups so I have to use cluster robust standart errors. However, the dataset also has some extreme outliers and I want to deal with those using a outlier robust regression method. I am working with python statsmodels and I have noticed that the robust_linear_models.rlm method does not support cluster robust standart errors. I am wondering whether this is the case because it is not possible to have both cluster robust standart errors and an outlier robust regression or because this is not implemented in statsmodels.

$\endgroup$
2
  • $\begingroup$ It's possible based on general principles, but I didn't find much literature on it github.com/statsmodels/statsmodels/issues/1379 $\endgroup$
    – Josef
    Apr 12, 2021 at 17:47
  • $\begingroup$ Is anyone aware of a function in a different language (e.g. R) that could do this? $\endgroup$
    – umbal
    Apr 15, 2021 at 11:06

1 Answer 1

0
$\begingroup$

I think I found out how to run such a regression in practice. One can use statsmodels RLM without cluster robust errors to get the weights assigned to each observation and then plug these weights into statsmodels WLS, which does support cluster robust standard errors. Since clustering only affects the significance but not the coefficients, the weights from the RLM regression without clustering should be correct.

$\endgroup$

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.