Skip to content

REF/ENH: GLM-Binomial/Bernoulli count versus probability #2698

Open

Description

@josef-pkt

I just saw that GLM binomial fittedvalues returns probabilities not counts.
Binomial is actually Bernoulli with frequency weights.

The difference will be for prediction and prediction confidence intervals and margins depending on whether we want results for proportions or counts.

possible solution: add frequency weights explicitly and introduce different "Binomial/Bernoulli" families, one for count data and one for proportion results.

alternative (maybe easier): add count option to predict and related

If we allow generic multiplicative exposure, then I think it is equivalent to specifying a frequency weight in prediction for general GLM.

Activity

  1. josef-pkt commented on Nov 7, 2015

    @josef-pkt
    MemberAuthor

    usecase that I'm looking at right now:
    contingency tables with binomial endogenous dimension (Agresti examples)

  2. josef-pkt commented on Jul 6, 2021

    @josef-pkt
    MemberAuthor

    #106 (comment)

    I'm adding n_trials to get_distribution, but AFAICS, we don't have the option for predict.

    using "non-standard" rates definition in GLM-Binomial will make it more difficult to have diagnostics based on count models.

    Note: residuals, e.g. resid_response are defined in terms of counts, i.e. multiplied by n_trials

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