Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLM robust sandwich covariance matrices #1738

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

Comments

Projects
None yet
2 participants
@josef-pkt
Copy link
Member

commented Jun 4, 2014

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
http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm

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

reference
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)

@josef-pkt josef-pkt referenced this issue Jun 4, 2014

Closed

MAINT: GLM #1734

@josef-pkt josef-pkt added this to the 0.6 milestone Aug 19, 2014

@josef-pkt

This comment has been minimized.

Copy link
Member Author

commented Aug 19, 2014

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

@jseabold

This comment has been minimized.

Copy link
Member

commented Sep 20, 2014

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

@jseabold jseabold closed this Sep 20, 2014

@josef-pkt

This comment has been minimized.

Copy link
Member Author

commented 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
You can’t perform that action at this time.