Skip to content

Add to estimators of V[B] for QMLE #1095

Open

Description

@jseabold

I'm looking mainly at Poisson QMLE right now, but I think this holds for several of the maximum likelihood estimators we have if the model is not parametrically correctly specified and I assume GLM too (any linear exponential family). For example, if Poisson is used as a QMLE then we need to provide covariance matrices and post-estimation tests that are robust to the (lack of) distributional assumptions. Right now everything assumes that the models is fully correct.

I'm not sure how much (yet) the sandwich stuff we have already will work here, at least for the covariance, and just needs to be an available option.

documentation for what Stata uses: search help for _robust with section Maximum likelihood estimators in p.pdf

Activity

  1. josef-pkt commented on Sep 24, 2013

    @josef-pkt
    Member

    GenericLikelihoodModel has a sandwich form hjjh cov and bse (still misnomed I think)
    the discrete MLE models all have jac defined so it can simply be added.

    The usual sandwich interpretation is not so nice with non-linear models, because the parameter estimates are not consistent (or unbiased) if the likelihood function is mis-specified. reference ?
    In contrast to linear models where OLS parameter estimates are consistent.

    GEE has robust cov_params for GLM models.

    I'm looking currently into GMM estimation that includes discrete models.

  2. jseabold commented on Sep 24, 2013

    @jseabold
    MemberAuthor

    AFAIK, the parameter estimates are consistent if the first moment is correctly specified and the likelihood is in the linear exponential family (Gourieroux, Monfort, and Trognon, 1984). But the usual estimator for the variance is not and needs a sandwich correction. Discussed in Cameron and Trivedi's Microeconometrics and Wooldridge Cross-Section and Panel book.

  3. jseabold commented on Sep 24, 2013

    @jseabold
    MemberAuthor

    (Unrelated: but I added panel poisson with fixed effects to my panel-vincent branch. The panel-averaged panel poisson model can be estimated via GEE. Might make a good excuse for me to go through the GEE PR soon. I think there's also a GMM estimator for the usual fixed effects model, but it's equivalent to the conditional MLE up there now.)

  4. josef-pkt commented on Sep 24, 2013

    @josef-pkt
    Member

    On the So-Called "Huber Sandwich Estimator" and "Robust Standard Errors"
    Author(s): David A. FreedmanReviewed work(s):Source: The American Statistician, Vol. 60, No. 4 (Nov., 2006), pp. 299-302Published by: American Statistical AssociationStable URL: http://www.jstor.org/stable/27643806 .

    which emphasizes bias

    I also just read a paper for a Stata package that estimates Logit with heteroscedasticity. In this case the parameters are beta / sigma normalized, and if sigma differs by groups, then the interpretation of the estimated parameters does not just reflect the effect difference between the groups, but also variance differences.

    In never read much about quasi-likelihood, but enough now for GMM, and Know also only a limited amount about the exponential family special case.
    If we just look at the moment restriction E(y) = exp(x b), then we can consistently estimate the parameters and get the GMM sandwich cov_params.
    However, if we use the other results from the MLE models (that are not based on the asymptotic distribution of the parameter estimates), then we might be using more information from the likelihood model itself which would be "incorrect" or mis-specified.

    about your panel case: Do you a common time structure and period effect as in Macro Panels, or do you have errors independent across individuals?
    The latter is the GEE case (in the PR), and the "repeated measures" case. observations correlated within an individual but uncorrelated across individuals.

    GEE is mostly static panel GMM with covariance structure, as far as I have figured out so far. (I needed to read up on GMM with conditional moment restrictions, which I had avoided the last time I went through this.)

  5. josef-pkt commented on Sep 24, 2013

    @josef-pkt
    Member

    I also just read a paper for a Stata package that estimates Logit with heteroscedasticity. In this case the parameters are beta / sigma normalized, and if sigma differs by groups, then the interpretation of the estimated parameters does not just reflect the effect difference between the groups, but also variance differences.

    "Estimating heterogeneous choice models with oglm"
    http://www3.nd.edu/~rwilliam/oglm/oglm_Stata.pdf

    interesting read, also makes normalization clearer, and points out that parameters might be difficult to interpret if there are competing observationally equivalent models.
    underlying model is ordered logit.

  6. josef-pkt commented on Sep 25, 2013

    @josef-pkt
    Member

    I added the Stata help reference to the description, (the first time I found it). technical details for vce(robust)
    looks the same as H J'J H plus degrees of freedom correction
    My reading for HJJH was straight from White, which also has the "sanity" test based on H - HJJH IIRC

    their u are the scores, ie. jac in our MLE models
    cluster robust should be possible directly with the current sandwich (it's just adding over groups, might be a shorter command with the pandas grouping but faster with mine, possibly)

    Note: the basic structure of the sandwich is the same in linear model, IV and GMM (optimal weight matrix)
    I was looking at the GMM case for the general pattern, and would like to get the general options for different sandwiches there, (including options for when the number of "moments" is large, i.e. many parameters/explanatory variables in the simpler cases, many instruments in the IV/GMM case).

  7. jseabold commented on Sep 25, 2013

    @jseabold
    MemberAuthor

    On Tue, Sep 24, 2013 at 7:01 PM, Josef Perktold [email protected]:

    On the So-Called "Huber Sandwich Estimator" and "Robust Standard Errors"
    Author(s): David A. FreedmanReviewed work(s):Source: The American
    Statistician, Vol. 60, No. 4 (Nov., 2006), pp. 299-302Published by:
    American Statistical AssociationStable URL:
    http://www.jstor.org/stable/27643806 .

    which emphasizes bias

    The section that talks about the pseudo-likelihood is the same as the
    quasi-likelihood, but it's a pretty flippant discussion from my reading.
    All of the literature I've seen on QMLE takes care to point out that the
    Information matrix can't be used for inference anymore.

    about your panel case: Do you a common time structure and period effect as
    in Macro Panels, or do you have errors independent across individuals?

    This is the so-called population average case, because the individual
    random effects are marginalized out but corrected for the (assumed)
    correlation structure. At least that's my understanding. I'm not doing
    random effects for this.

    The latter is the GEE case (in the PR), and the "repeated measures" case.
    observations correlated within an individual but uncorrelated across
    individuals.

    GEE is mostly static panel GMM with covariance structure, as far as I have
    figured out so far. (I needed to read up on GMM with conditional moment
    restrictions, which I had avoided the last time I went through this.)

    Yes, that sounds right to me. This pa case still relies on strict
    exogeneity of regressors but the covariance structure can be specified
    under different assumptions.

  8. josef-pkt commented on Nov 16, 2013

    @josef-pkt
    Member

    just another piece of information while looking at heteroscedasticity across models
    reading Wooldridge 2010

    binary models, Logit Probit: variance cannot be misspecified without having also the mean function misspecified,
    but Wooldridge points to the panel case where we might want to have misspecified correlation (I didn't read that section yet)

    Poisson regression: (looked at mainly with exp(X b) mean function.
    Similar to OLS, mean function parameters are consistently estimated even if variance function is misspecified. But we need variance function assumptions for inference and robust cov helps to be robust. (Wooldridge)
    But as I argued above, Wooldridge also points out that this is useful if we focus on parameter estimation, and estimating average marginal effects.

    What I haven't figured out is how Logit and Probit fit in with the robustness of the mean function estimation for the LEF family.

    I finally started to read some chapters in Wooldridge's book
    Wooldridge's book is very good because he puts a lot more emphasis on what the (usually implicit, in his case "explicit") assumptions are in a hypothesis test. I'm looking currently mainly at LM tests, and there we have everything from tests that assume that the entire Poisson hypothesis is correct, to tests that just take some pieces at a time (e.g. test a moment function like the mean and variance funtion and test without assuming higher moments satisfy the Poisson assumption, Wooldridge 1991 on robust regression-based diagnostics)

    for some version of robust LM test, we need robust cov Wald tests after WLS
    #863 for adding cluster robust in discrete, plus many other tickets
    the current base calculations in statsmodels.stats need generalizations to make them work for other cases than OLS.

    (I still haven't tried to look at Gourieroux, Monfort, and Trognon, 1984)

  9. josef-pkt commented on Jun 16, 2014

    @josef-pkt
    Member

    reading another chapter of Wooldridge
    chapter 13 has a very good discussion on overview for the general case of MLE
    Partial Likeliood for panel data if we don't specify the dynamic structure or autocorrelation -> cluster robust standard errors.

    outside of exponential family: we have the best approximating model (minimum Kullback-Leibler information criterion), and everything essentially follows from properties of M-estimation
    (need to use Hessian, not expected Hessian in this case (*))

    (*) earlier in the chapters Wooldridge mentiones that expected Hesssian has better small sample properties (in general, usually, ?)

    edit : problem 13.12, p.521 with canonical link function in GLM the Hessian is also the expected Hessian, (Hessian doesn't depend on endog y)

    Example Probit: we need sandwich covariance if P(y=1| x) != normal.cdf(x beta). (misspecified distribution/ single index)

  10. josef-pkt commented on Aug 23, 2014

    @josef-pkt
    Member

    update: basic/generic robust cov_types have been added in #1870 (GLM and discrete)
    specific cov_types like overdispersed Poisson are still missing
    Stata has in several case OIM, EIM and OPG (observed, expected information matrix, outer product of gradient,
    we only have the default Hessian; GLM has now the methods to calculate both OIM and EIM.

    this issue has a lot more information and references that are not covered yet, both for docs and for what's not covered yet.

  11. added this to the 0.7 milestone on Aug 23, 2014
  12. modified the milestones: 0.8, 0.7 on Jul 17, 2015
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