Skip to content

BUG/ENH: discrete count models, predict default for offset, exposure  #4595

Closed

Description

@josef-pkt

It looks like discrete.CountModel.predict doesn't use an appropriate default offset and exposure. when exog is provided.
In contrast, GLM uses scalar defaults that broadcast

        elif offset is None:
            offset = 0.

currently for discrete.Poisson
res.predict(exog[:5])
raises an exception because it uses the model offset and exposure that have a different number of rows

Explicitly specifying it works:
res.predict(exog[:5], offset=0, exposure=1

Activity

  1. added this to the 0.10 milestone on May 5, 2018
  2. added 5 commits that reference this issue on May 5, 2018
    3ead8a7
    3539dc0
    5c3fd86
    8b34b84
    d8e40d2
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions