jepusto / clubSandwich

Cluster-robust (sandwich) variance estimators with small-sample corrections
http://jepusto.github.io/clubSandwich/
46 stars 7 forks source link

Cluster-Robust SEs for models fitted with glmer #97

Open startrooper101 opened 1 week ago

startrooper101 commented 1 week ago

I have been using this package since its very beginning and therefore I have to start thanking you for the amazingly useful work.

That said, the key critical feature I have always missed in it is the ability to work with results from glmer models (from package lme4). Would it be possible for you to consider including that functionality in the future? It would allow users to more easily estimate cluster-robust SEs for GLM with random effects.

Thanks!

jepusto commented 1 week ago

Thanks for your inquiry! Since the main contribution of clubSandwich is the small-sample corrections for CRVE, the scope of the package is limited to models for which the small-sample corrections have been derived (or are easy enough for me to work out). As far as I know, nobody has yet worked out small-sample corrected CRVE for GLMMs (if you know of relevant work, please point me to it!). Even the notion of basic cluster-robust SEs in GLMMs is a bit fuzzy---it seems like one can certainly compute sandwich estimators for GLMMs, but what forms of model misspecification are they robust to?

All that is to say, it seems unlikely that I'll be able to add support for glmer in the near future.