Skip to content

Allow offset and exposure to be used together with log link; raise excep... - #1635

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
kshedden:glm_offset5
May 20, 2014
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
kshedden:glm_offset5

Conversation

@kshedden

Copy link
Copy Markdown
Contributor

...tion if exposure is used when the ink is not the log

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling e625801 on kshedden:glm_offset5 into b52bc09 on statsmodels:master.

@josef-pkt

Copy link
Copy Markdown
Member

I just saw that there is also a bug in predict.
It shouldn't use the stored offset and exposure if exog is given. Should result in shape mismatch if predict exog doesn't have nobs rows.

@kshedden

Copy link
Copy Markdown
Contributor Author

Should we add arguments for offset and exposure and/or warn? It seems
dangerous to silently ignore them.

On Tue, May 20, 2014 at 11:33 PM, Josef Perktold
[email protected]:

I just saw that there is also a bug in predict.
It shouldn't use the stored offset and exposure if exog is given. Should
result in shape mismatch if predict exog doesn't have nobs rows.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1635#issuecomment-43642175
.

@josef-pkt

Copy link
Copy Markdown
Member

Yes, I think we need to include the offset and exposure arguments in the same way as in discrete_model CountModel.predict.

aside: CountModel.predict uses a user specified offset and exposure, even if the estimation didn't use it. I don't see a problem with this. Could be useful if we want to "manipulate" the prediction.

@kshedden

Copy link
Copy Markdown
Contributor Author

Should I add this to the glm_offset5 PR, or start a new one?

On Wed, May 21, 2014 at 12:00 AM, Josef Perktold
[email protected]:

Yes, I think we need to include the offset and exposure arguments in the
same way as in discrete_model CountModel.predict.

aside: CountModel.predict uses a user specified offset and exposure, even
if the estimation didn't use it. I don't see a problem with this. Could be
useful if we want to "manipulate" the prediction.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1635#issuecomment-43645725
.

@josef-pkt

Copy link
Copy Markdown
Member

I think I could merge this as is. Only the commit message is wrong.

Then you can start a new branch from updated master

josef-pkt added a commit that referenced this pull request May 20, 2014
REF/BUG Allow offset and exposure to be used together with log link, see #1486
@josef-pkt
josef-pkt merged commit e0fed32 into statsmodels:master May 20, 2014
@josef-pkt

Copy link
Copy Markdown
Member

merged, thank Kerby.

@kshedden
kshedden deleted the glm_offset5 branch June 9, 2014 02:01
PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this pull request Sep 2, 2014
REF/BUG Allow offset and exposure to be used together with log link, see statsmodels#1486
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