Skip to content

BUG: GLM NegativeBinomial: llf ignores offset and exposure #1684

Closed

Description

@josef-pkt

I assume this is a bug, see #1486 for general problems with offset and exposure

    def llf(self):
        _modelfamily = self.family
        if isinstance(_modelfamily, families.NegativeBinomial):
            XB = np.dot(self.model.exog, self.params)
            val = _modelfamily.loglike(self.model.endog, fittedvalues=XB)

This should use model.predict, so we don't have to care about how it is calculated.

Activity

  1. josef-pkt commented on May 22, 2014

    @josef-pkt
    MemberAuthor

    terminology, naming:
    in GLM fittedvalues=mu which is predict(linear=False), but here it is used for linear=True, i.e. X dot params

  2. josef-pkt commented on Aug 24, 2014

    @josef-pkt
    MemberAuthor

    fixed by @kshedden as part of #1734, rebase merged in #1821

  3. added this to the 0.6 milestone on Aug 24, 2014
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