Skip to content

BUG: wls_prediction_std fix weight handling, see 987 - #1582

Merged
josef-pkt merged 6 commits into
statsmodels:masterfrom
josef-pkt:fix_prediction_std
Apr 21, 2014
Merged

josef-pkt merged 6 commits into
statsmodels:masterfrom
josef-pkt:fix_prediction_std

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

see #987
if weights were None, then it used the model.weights, which was in some cases the wrong shape or the wrong content.

This is broken for WLS if exog is not None, but weights is None.
It is also broken for OLS, because weights in OLS has full length. (refactoring ? IIRC it was scalar 1. before)

This PR fixes the weight handling, but doesn't address the formula support in #987

@josef-pkt josef-pkt changed the title BUG: fix weight handling, fails in some cases, see 987 BUG: wls_prediction_std fix weight handling, see 987 Apr 14, 2014
@josef-pkt

Copy link
Copy Markdown
Member Author

needs unit test, but then should be merged soon.

handling formulas in #987 can go into new PR

@josef-pkt

Copy link
Copy Markdown
Member Author

I don't find any unittests for this. I thought it's tested through influence_diagnostic but messing up the numbers doesn't raise any test failures.

josef-pkt added a commit that referenced this pull request Apr 21, 2014
BUG: wls_prediction_std fix weight handling, see 987
@josef-pkt
josef-pkt merged commit f2bc723 into statsmodels:master Apr 21, 2014
@josef-pkt
josef-pkt deleted the fix_prediction_std branch April 21, 2014 04:26
PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this pull request Sep 2, 2014
BUG: wls_prediction_std fix weight handling, see 987
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.

1 participant