Skip to content

ENH: score test for zero-inflation and over/excess dispersion #7131

Open

Description

@josef-pkt

I wrote separate tests for zero-inflation and over dispersion in Poisson.

more general:

  • score test for other count models, distributions, NB, Binomial
  • joint test for both, or test for one that is robust the the other

Deng, Dianliang, and Sudhir R. Paul. 2005. “Score Tests for Zero-Inflation and over-Dispersion in Generalized Linear Models.” Statistica Sinica 15 (1): 257–76.

(reference found through penalization article, #7128 (comment) )

update
I found another article by same authors
Deng, Dianliang, and Sudhir R. Paul. “Score Tests for Zero Inflation in Generalized Linear Models.” Canadian Journal of Statistics 28, no. 3 (2000): 563–70. https://doi.org/10.2307/3315965.

Activity

  1. josef-pkt commented on Oct 31, 2020

    @josef-pkt
    MemberAuthor

    aside: overdispersed likelihood looks like a polynomial expansion around the original, but only one extra term is used in the derivation of score tests.

    note dispersion in Poisson is a test on variance without changing mean.
    AFAIU, In ZIP, dispersion also affects mean, i.e. dispersion and mean are not separable,

    related: try TIC, takeushi information criterion, to compare the different count models if we need to select one.

  2. josef-pkt commented on Nov 1, 2020

    @josef-pkt
    MemberAuthor

    over dispersion in ZI modes

    might be interesting, seems to work for various power variance functions, maybe also GPP.
    extension of Dean over dispersion test in Poisson to ZI

    Yang, Zhao, James W. Hardin, and Cheryl L. Addy. 2010. “Some Remarks on Testing Overdispersion in Zero-Inflated Poisson and Binomial Regression Models.” Communications in Statistics - Theory and Methods 39 (15): 2743–52. https://doi.org/10.1080/03610920903177397.

    Note, these are full likelihood score tests, with derived analytical score and hessians
    Using a CMT would be simpler, especially with OPG (similar to Gorm, Cameron, Trivedi version of Poisson overdispersion, IIRC)

  3. josef-pkt commented on Nov 1, 2020

    @josef-pkt
    MemberAuthor

    BTW: we don't have any ZI or dispersed alternatives to Binomial count, like Beta-Binomial or ZIB

  4. josef-pkt commented on Nov 1, 2020

    @josef-pkt
    MemberAuthor

    nice new articles

    This is the hessian/likelihood version of the zero inflation/deflation test checking directly the zero count, that I have already with OPG.
    AFAICS, they use a sandwich form for the cov of the augmented score/moment conditions.
    I think this should make a good example and test case for the general CMT version. For binned endog, we can just augment the moment conditions with more predicted probs for bins.

    He, Hua, Hui Zhang, Peng Ye, and Wan Tang. 2019. “A Test of Inflated Zeros for Poisson Regression Models.” Statistical Methods in Medical Research 28 (4): 1157–69. https://doi.org/10.1177/0962280217749991.

    Ye, Peng, Yi Tang, Liuquan Sun, Wan Tang, and Hua He. n.d. “Testing Inflated Zeros in Binomial Regression Models.” Biometrical Journal n/a (n/a). Accessed October 31, 2020. https://doi.org/10.1002/bimj.202000028.

    Tang, Yi, and Wan Tang. 2018. “Testing Modified Zeros for Poisson Regression Models:” Statistical Methods in Medical Research, September. https://doi.org/10.1177/0962280218796253.

    by the same authors, maybe related, I didn't look closely
    but it says zero-inflated predictors, so maybe not related and not so interesting
    Ye, Peng, Wan Tang, Jiang He, and Hua He. 2019. “A GEE-Type Approach to Untangle Structural and Random Zeros in Predictors.” Statistical Methods in Medical Research 28 (12): 3683–96. https://doi.org/10.1177/0962280218812228.

  5. josef-pkt commented on Nov 17, 2020

    @josef-pkt
    MemberAuthor

    correction to previous comment

    test_poisson_zeroinflation has the cross-derivative and should be the same as He et al. He et all use the sandwich cov, AFAICS I have standard, correctly specified hessian as cov
    The function hardcodes poisson prob and derivative at zero , this should be made more generic.
    This doesn't reuse a CMT function.

    Note,
    He et al derive the test as a CMT, no excess zero is an additional moment condition (without additional exog_infl)
    Jansakul and Hinde derive the score_test against the ZIP model under the assumption that Poisson is correctly specified.

    So, maybe there are differences between the two tests, besides sandwich form of cov.

    test_chisquare_prob is the opg version for binned chisquare test

  6. josef-pkt commented on Nov 18, 2020

    @josef-pkt
    MemberAuthor

    EIM versys OIM

    In some cases computing EIM is possible for score_tests, even when the general expressions are too difficult. When we use a generic function, then we would only have OIM/Hessian.

    ZIP versus GPP or NBP excess dispersion score tests

    Zamani, Hossein, and Noriszura Ismail. 2013. “Score Test for Testing Zero-Inflated Poisson Regression against Zero-Inflated Generalized Poisson Alternatives.” Journal of Applied Statistics 40 (9): 2056–68. https://doi.org/10.1080/02664763.2013.804904.

    Fisher information matrix, EIM, at the zip null is the same whether the alternative is GPP or NBP. It has same form as function of mu, and under the null mu is from Poisson. So score test against both alternatives are the same.
    Note, dispersion coefficient in GPP can be negative, so null assumptions a=0 is in the interior of the GPP parameter space but on the boundary/limit of the NBP parameter space.

  7. josef-pkt commented on Nov 20, 2020

    @josef-pkt
    MemberAuthor

    just a thought

    Weights in the different score equation for zero inflation or excess dispersion are derived from a specified alternative.
    He et al (IIRC) changed weights to reduce the effect of large residuals in some versions, arguing that they have a large effect on the specification test (similar to outliers)

    more general,
    I guess this is the question of optimal instruments in the extra moment conditions where instruments work as weight functions, e.g. using var in squared resid_pearson.
    If we don't want to rely on this weighting, then we could just use some default weights e.g. uniform.
    e.g. zero-inflated probability instead of some variance or alternative specific weighted version of it.

    We would loose efficiency against specific alternatives but might gain robustness to "over-weighted" observations.

    example Binomial/Bernoulli where weights (inverse variance) is very large for probs close to 0 or 1.

  8. josef-pkt commented on Nov 20, 2020

    @josef-pkt
    MemberAuthor

    small sample correction

    Gurmu add small sample (bias) correction to score test for dispersion in zero-truncated Poisson, and mentions that Dean and Lawless did the same.

    I don't remember ever having paid attention to this.

    i.e. we might have excess dispersion tests that depend on

    • alternative, score equation is derived from specific alternative model
    • small sample corrections, if availalbe
    • robustness to misspecification, e.g. higher moments using some robust cov_type
    • one-sided, two-sided

    maybe there is a better structure to my list of excess dispersion test

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