GLM robust sandwich covariance matrices #1738

josef-pkt opened this Issue Jun 4, 2014 · 3 comments


None yet

2 participants


GLM in Stata has vce(robust) vce(hac) and vce(cluster), for hac see #1625

It looks like all we need is score_obs and Hessian, and we can use the generic code for sandwiches.
We can add those through numerical derivatives, see #1726 or we can add analytic expression. Stata only refers to Hardin and Hilbe book, but SAS has a good, explicit formula collection in the documentation, see section on Maximum Likelihood Fitting in

(I added test results for GLM binomial (Logit) for vce(robust) to the fit_constrained PR #1714 )

Cameron Trivedi Microeconometrics section 5.7.3 (linear exponential family) and 5.7.4 (Generalized Linear Models) has the formulas to get MLE and score_obs for the GLM models.
(econometrics notation g() is the inverse link function, i.e. the single index function)

This was referenced Jun 4, 2014
@josef-pkt josef-pkt added this to the 0.6 milestone Aug 19, 2014

GLM cov_type with robust covariances will be added in PR #1870


Closing this since it sounds like it was merged in #1870.

@jseabold jseabold closed this Sep 20, 2014

@jseabold you can pretty much ignore all cov_type robust covariance issues.

Except for documentation I don't have anything more planned for 0.6.
However, I left most of the issues open because I have to go through them again to add another round of options.

for example, Kerby just ran into the issue of OIM versus EIM covariances in GLM, for which there is no option yet. (IRLS has expected information matrix, the hessian defaults to observed information matrix)

quasi-poisson is also not checked/tested yet, even though it might have been implemented since the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment