Skip to content

GLM robust sandwich covariance matrices #1738

Closed

Description

@josef-pkt

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)

Activity

  1. added this to the 0.6 milestone on Aug 19, 2014
  2. josef-pkt commented on Aug 19, 2014

    @josef-pkt
    MemberAuthor

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

  3. jseabold commented on Sep 20, 2014

    @jseabold
    Member

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

  4. josef-pkt commented on Sep 20, 2014

    @josef-pkt
    MemberAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions