Skip to content

ENH specification tests for heterogeneity, constant parameters, especially score/LM tests or CMT #7178

Open

Description

@josef-pkt

still a vague issue, I ran into literature on testing for heterogeneity including information matrix tests.
This is mostly in context of GLM and discrete MLE models (similar to excess dispersion and similar)

possible misspecifications

  • random effects and random parameters in fixed effects models
  • random parameters depending on explanatory variables (*)
  • ...

related
in meta-analysis we have tests for random versus constant mean/effect size

AFAIR, I never looked at score tests with random effect under the alternative
However, several overdispersion tests for count models are motivated by a mixing distribution for random parameters

(*) I guess this is mostly the same as a missing interaction or nonlinearity, e.g. we could interact a spline basis with an explanatory variable and run a variable addition score test

Activity

  1. josef-pkt commented on Nov 24, 2020

    @josef-pkt
    MemberAuthor

    Chesher, Andrew. 1984. “Testing for Neglected Heterogeneity.” Econometrica 52 (4): 865–72. https://doi.org/10.2307/1911188.

    Chesher, Andrew. 1983. “The Information Matrix Test: Simplified Calculation via a Score Test Interpretation.” Economics Letters 13 (1): 45–48. https://doi.org/10.1016/0165-1765(83)90009-5.

    Chesher, Andrew, and J. M. C. Santos Silva. 2002. “Taste Variation in Discrete Choice Models.” The Review of Economic Studies 69 (1): 147–68. https://doi.org/10.1111/1467-937X.00201.

    The following points out problems with parameter heterogeneity, but makes it sound worse than it is (IMO)
    Zietz, Joachim. 2001. “Heteroskedasticity and Neglected Parameter Heterogeneity.” Oxford Bulletin of Economics and Statistics 63 (2): 263–73. https://doi.org/10.1111/1468-0084.00220.

  2. josef-pkt commented on Nov 24, 2020

    @josef-pkt
    MemberAuthor

    one usecase is in preventing models that cannot "work", i.e. might end up with convergence failures, or try to hit a boundary of the parameter space.

    eg.

    • we cannot estimate an overdispersed model like NegBin if Poisson has under dispersion, i.e. Poisson plus random effect doesn't fit the data.
    • we cannot estimate a ZI model if there is large zero-deflation. We could have some deflation if we allow a linear link instead of logit and probit as inflation model

    in both cases convergence failures or weird results are likely, because functions are often not well behaved close to the boundary

  3. josef-pkt commented on Nov 24, 2020

    @josef-pkt
    MemberAuthor

    If we have clusters defined, then using cluster dummies as added variables would be a score test for constant intercept against the cluster specific fixed effect alternative.

    For fixed T, k_cluster -> inf asymptotics we would have an increasing dimension of the parameter space under the alternative, which might cause some problems for standard score test. (I don't know the theory for that case.)

  4. josef-pkt commented on Nov 24, 2020

    @josef-pkt
    MemberAuthor

    Liang, Kung-Yee. 1987. “A Locally Most Powerful Test for Homogeneity with Many Strata.” Biometrika 74 (2): 259–64. https://doi.org/10.1093/biomet/74.2.259.

    score test against random effect, with hypothesis variance is zero
    The test statistic is the same as information matrix test, but only with respect to the "added parameters", i.e. cluster dummies/intercept.

  5. josef-pkt commented on Nov 25, 2020

    @josef-pkt
    MemberAuthor

    Lin, Xihong. 1997. “Variance Component Testing in Generalised Linear Models with Random Effects.” Biometrika 84 (2): 309–26. https://doi.org/10.1093/biomet/84.2.309.

    looks pretty general for GLM, I read a few parts of it.

    general random effects, e.g. a random cluster intercept, imply correlation across observations.
    AFAICS, the general score statistic uses (nobs, nobs) matrices which correspond to sandwiches that allow for correlation across observations and heteroscedasticity.
    I guess, the general information matrix test has similar structure (but I never looked at the details)

    That means we need more structure than the general version and test for more specific alternatives, e.g. cluster specific random effects or within cluster correlation.
    And we will run into the issue between small N, large T versus large N, small T asymptotics.
    Before Proposition 1, they mention asymptotic means small cluster sizes, and number of clusters goes to inf.

    AFAICS,

  6. josef-pkt commented on Nov 25, 2020

    @josef-pkt
    MemberAuthor

    here is an explicit case for oneway group/cluster specific random intercept in Logit

    This might be a good starting point

    Commenges, Daniel, Luc Letenneur, Helene Jacqmin, Thierry Moreau, and Jean-Francois Dartigues. 1994. “Test of Homogeneity of Binary Data with Explanatory Variables.” Biometrics 50 (3): 613–20. https://doi.org/10.2307/2532776.

    (I'm giving up with this for now, topic is too large and it takes time to figure out what to implement and how)

  7. josef-pkt commented on Nov 25, 2020

    @josef-pkt
    MemberAuthor

    One thing I'd like to get are specification that can discriminate in repeated measures, cluster, panel data between individual specific random intercept constant over time versus over-dispersed model like the count models.

    Mixture distributions like NegativeBinomial or BetaBinomial assume that each distribution comes from the overdispersed mixture distribution. In time aggregated cross-sectional data that's all we have. With repeat observations, within dispersion and correlation differs from dispersion and correlation between groups or individuals.
    (We ran into something like this when we looked at aggregation for tweedie, and how aggregation affects the dispersion function, IIRC.)

  8. josef-pkt commented on Nov 25, 2020

    @josef-pkt
    MemberAuthor

    one more, making the link to over dispersion tests

    unobserved observation specific heterogeneity in negative binomial (mixing the mixing distribution)
    derivation is based on Chesher 1984, but result is similar to Dean 1992 which also used additive and multiplicative random effect to derive overdispersion test

    Kim, Jeonghwan, and Woojoo Lee. 2019. “On Testing the Hidden Heterogeneity in Negative Binomial Regression Models.” Metrika 82 (4): 457–70. https://doi.org/10.1007/s00184-018-0684-x.

    aside: in panel, cluster data we can remove additive and multiplicative individual/group specific intercept.
    One version is in the test cases for GMM. That was never added as available model and is just for unit tests, Only model specific part are the moment condition functions
    reference is Windmeijer IIRC

  9. josef-pkt commented on Nov 27, 2020

    @josef-pkt
    MemberAuthor

    Chesher mentions that the information matrix test applied to group-specific random intercept is the same as the Breusch-Pagan test.
    (I added now the reference to Chesher 1984 econometrica to second comment)

    We only have breucsh pagan for heteroscedasticity
    https://www.statsmodels.org/dev/generated/statsmodels.stats.diagnostic.het_breuschpagan.html

    Can this be used for testing for group specific random effect or is there another test?

  10. josef-pkt commented on Nov 27, 2020

    @josef-pkt
    MemberAuthor

    some background reading
    Davidson, Russell, and James G. MacKinnon. 1987. “Implicit Alternatives and the Local Power of Test Statistics.” Econometrica 55 (6): 1305–29. https://doi.org/10.2307/1913558.

  11. josef-pkt commented on Nov 30, 2020

    @josef-pkt
    MemberAuthor

    related to information matrix tests
    seems to test low dimensional functions of the information matrix equality

    the first article has related literature overview in the introduction

    Golden, Richard M., Steven S. Henley, Halbert White, and T. Michael Kashner. 2016. “Generalized Information Matrix Tests for Detecting Model Misspecification.” Econometrics 4 (4): 46. https://doi.org/10.3390/econometrics4040046.

    Zhou, Qian M., Peter X.-K. Song, and Mary E. Thompson. 2012. “Information Ratio Test for Model Misspecification in Quasi-Likelihood Inference.” Journal of the American Statistical Association 107 (497): 205–13. https://doi.org/10.1080/01621459.2011.645785.

    sounds interesting (but left for another day)

    two more, but I didn't look at all

    Presnell, Brett, and Dennis D. Boos. 2004. “The IOS Test for Model Misspecification.” Journal of the American Statistical Association 99 (465): 216–27.

    Capanu, Marinela, and Brett Presnell. 2008. “Misspecification Tests for Binomial and Beta-Binomial Models.” Statistics in Medicine 27 (14): 2536–54. https://doi.org/10.1002/sim.3049.

  12. josef-pkt commented on Dec 4, 2020

    @josef-pkt
    MemberAuthor

    This includes IM test of Smith, P. J. and Heitjan, D. F. (1993) as overdispersion test, I didn't look closely

    one result: IM test with observed matrices is liberal, using EIM is better
    similar to other articles on bad small sample behavior of OPG or OIM based IM-test

    Hines, R. J. Ohara. 1997. “A Comparison of Tests for Overdispersion in Generalized Linear Models.” Journal of Statistical Computation and Simulation 58 (4): 323–42. https://doi.org/10.1080/00949659708811838.

    Smith, P. J. and Heitjan, D. F. (1993) Testing and adjusting for departures from nominal
    dispersion in generalized linear models. Applied Statistics, 42, 31 -41.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions