Skip to content

SUMM/ENH: dispersion modelling in GLM, exponential family #2889

Open

Description

@josef-pkt

(this is triggered by some readings on dispersion estimation as followup to Tweedie #2858 #2872)

the question is how do we estimate dispersion parameters or data (exog not mean) varying variance functions.

Basic idea:

  1. underlying distribution for fixed dispersion is LEF, mean and dispersion are orthogonal (asymptotically independent)
  2. we can just use any moment conditions on the variance and covariance of errors to estimate a dispersion function.

The question is how do we choose the moment condition or estimating function for the dispersion parameters.

example:
Tweedie: In this case we could use full MLE but that is expensive because we need to compute the compound Poisson distribution.
Similar in several other distributions like normal that have explicit variance and dispersion in the likelihood function.
Poisson or Binomial with general dispersion are not likelihood models and we need something else to define dispersion.

Instead we can use some moment definition based on Pearson or deviance residuals. E.g. used to estimate overdispersion.

analog to feasible generalized least squares FGLS:
use a model for the variance for squared residuals to estimate the parameters
e.g. double exponential model https://cran.r-project.org/web/packages/dglm/dglm.pdf

GEE does something similar to estimate the parameters of the working correlation matrix.

statistics:
various approaches to create "fake" likelihood models based on approximations to some general class of distributions. (extended quasi-likelihood, exponential dispersion models, double exponential models, ...)

econometrics: two main approaches AFAICS

  1. model the source of dispersion: e.g. explicitly model latent variables for unobserved heterogeneity or heteroscedasticity. e.g. Poisson with different mixing distributions, Probit with heteroscedasticity in the underlying normal latent variable
  2. Just use LEF and orthogonality of mean and 2nd moments to estimate with "ad-hoc" moment or orthogonality condition for variance or correlation. Mean parameter are estimation is robust to variance misspecification, just use sandwiches for inference. Same idea in GEE.
    (question: are there optimial instruments and efficient moment conditions for GMM.)
    Gourieroux et al., Wooldridge, Cameron and Trivedi

Another related approach is to find a non LEF distribution that has the desired properties and extra parameters. The advantage of this and item 1. for econometrics above is that we have a full probability model that we can use for prediction, instead of just estimating parameters or effects.

Getting started

  • two step or iterative estimation similar to FGLS on top of current GLM
    • extra parameter as in NegativeBinomial or Tweedie variance function
    • dispersion as function of explanatory variable GLMHet in analogy to GLSHet
      need var_weights from ENH: all weights in GLM #2879

Activity

  1. josef-pkt commented on Jul 1, 2021

    @josef-pkt
    MemberAuthor

    related aside:

    scale handling in GLM assumes in many cases that scale is scalar.
    e.g. GLM.get_distribution uses python float(scale) which raises exception if scale is not scalar.

    I didn't see any restriction like that in families, e.g. loglike_obs works with mu and matching array scale.

    (my current context: fixing GLM.get_distribution, (scipy distributions are fully vectorized in parameters)

  2. josef-pkt commented on Oct 8, 2021

    @josef-pkt
    MemberAuthor

    #7778 adds MultiLinkModels with full MLE

    Instead of trying to extend GLM, we just use standard MLE

    GLM + estimated var_weights might still be more misspecification robust than full MLE in cases like Gaussian (WLS-FGLS).
    However, standard pearson scale can be "bad", e.g. in gamma.

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