BUG: wls_prediction_std fix weight handling, see 987 #1582

Merged
merged 6 commits into from Apr 21, 2014

Projects

None yet

1 participant

@josef-pkt
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 from BUG: fix weight handling, fails in some cases, see 987 to BUG: wls_prediction_std fix weight handling, see 987 Apr 14, 2014
@josef-pkt
Member

needs unit test, but then should be merged soon.

handling formulas in #987 can go into new PR

@josef-pkt
Member

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 josef-pkt merged commit f2bc723 into statsmodels:master Apr 21, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@josef-pkt josef-pkt deleted the josef-pkt:fix_prediction_std branch Apr 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment