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

josef-pkt opened this Issue May 22, 2014 · 2 comments


None yet

1 participant


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.


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


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

@josef-pkt josef-pkt closed this Aug 24, 2014
@josef-pkt josef-pkt added this to the 0.6 milestone Aug 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment