Skip to content

ENH: predict_cdf predict_prob GLM gof #3415

Open

Description

@josef-pkt

(random idea for evaluating how well a distribution matches the data)

In GLM models like tweedie or gamma or Poisson, the error is not additive as in a gaussian model (linear or nonlinear least squares), instead we specify the distribution of endog given exog directly.
If we want to predict more than the mean, then we need a distribution of the predictions.

relatively simple would be the cdf(y | x), similar to discrete probability (pmf) in Poisson e.g. in Vuong test.
e.g. What's the population prediction for observing endog > some_number, which can compare model implied with data frequencies.

this would be mainly a wrapper around two things:

extras:

  • can we get something like a probability plot for this.
  • for discrete or interval probabilities we can also create a classification or confusion table.

Activity

  1. josef-pkt commented on Feb 5, 2017

    @josef-pkt
    MemberAuthor

    get_distribution was added to GLM and linear RegressionModel as part of Mediation PR #2352

  2. josef-pkt commented on Mar 24, 2017

    @josef-pkt
    MemberAuthor

    similar for OLS or models with additive residuals:
    The distribution is not relevant for asymptotics for the parameter and expected value/mean estimates, but is for predictive distribution (prediction intervals) and for small sample properties.

    And if the gof test fails for the use case, then we need alternative, which? (quantile or expectile estimators?)

  3. josef-pkt commented on Jun 7, 2017

    @josef-pkt
    MemberAuthor

    discrete.Poisson has method predict_prob (I think added by Skipper for Vuong test)
    added with discussion in #1088

  4. added this to the 0.11 milestone on Feb 17, 2019
  5. josef-pkt commented on Feb 17, 2019

    @josef-pkt
    MemberAuthor

    The new count models, like zero inflated models, have several statistics as option in predict. This has not been extended to older models in discrete or GLM.

    I have a notebook in a gist comparing predicted probabilities for the sample with the actual frequencies.
    I put some code in discrete._diagnostic_count for this, but it's not yet public.

  6. modified the milestones: 0.11, josef on Oct 5, 2019
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions