Skip to content

ENH: review of GLM families - #3543

Closed
lorentzenchr wants to merge 5 commits into
statsmodels:masterfrom
lorentzenchr:glm_families_review
Closed

lorentzenchr wants to merge 5 commits into
statsmodels:masterfrom
lorentzenchr:glm_families_review

Conversation

@lorentzenchr

Copy link
Copy Markdown
Contributor

Tries to settle most of the issues in #3377.

@coveralls

coveralls commented Mar 7, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.0008%) to 90.296% when pulling 8549fe2 on lorentzenchr:glm_families_review into c906881 on statsmodels:master.

"""

return (endog - mu) / np.sqrt(self.variance(mu)) / scale
return (endog - mu) / scale**(0.5)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency across models we might want to keep self.variance(mu) in here

return scale * np.sum((endog * np.log(mu/(1 - mu) + 1e-200) +
np.log(1 - mu)) * freq_weights)
return np.sum((endog * np.log(mu/(1 - mu)) +
np.log(1 - mu)) * freq_weights)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no clipping to protect overflow or zero division without 1e-200 ?

@josef-pkt

Copy link
Copy Markdown
Member

Just a quick preliminary skimming.
This needs a detailed review given that it makes changes to one of our core models.
I think adding the scale options looks good (since it adds an option it should be uncontroversial).
I didn't look at the binomial distribution, the main issue to check is whether it can be still interpreted as count distribution.

@josef-pkt

Copy link
Copy Markdown
Member

cross-link #2698 binomial is not count, this got me confused when trying to review this.
I didn't remember that binomial is not really a model count distribution (predicting counts)
related to: some changes in here use the proportion property for endog, instead of treating it as counts.

@josef-pkt josef-pkt closed this in cc3fd16 Jun 20, 2017
@lorentzenchr lorentzenchr mentioned this pull request Aug 20, 2017
22 of 27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants