Skip to content

BUG: GLM score_test, use correct df_resid - #7843

Merged
josef-pkt merged 1 commit into
statsmodels:mainfrom
josef-pkt:score_test_dfresid
Nov 4, 2021
Merged

josef-pkt merged 1 commit into
statsmodels:mainfrom
josef-pkt:score_test_dfresid

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

see #7840 only relevant if scale is estimated

The fix here temporarily resets model.df_resid inside GLMResults.score_test.
The standalone score_test function cannot be used in the res_constrained and res_full cases because it doesn't adjust the df_resid for the constrained scale estimation.

I also added scale as argument to _parameter_inference.score_test function, but it is currently not used.

aside:
for GLM-Gaussian, the unit test for wooldridge fails. I didn't check whether that is an equivalent test in this case.
It looks like the score_test versions correspond to different wooldridge pvaluex version than in poisson case.
currently skipped

@josef-pkt

Copy link
Copy Markdown
Member Author

merging, basic bugfix and all green

more on score_test will follow

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.

2 participants