Repository navigation
Conversation
… in loglike ENH: Many typos fixed ENH: Better PEP8 compliance in a few places
There was a problem hiding this comment.
slogdet was added in numpy 1.6.0, so it is fine to use now for statsmodels 0.6
(There might be some more places where we can clean up for numpy < 1.6)
There was a problem hiding this comment.
Probably a good idea as it isn't very hard to create numerical problems using poorly scaled data if only the log determinant is needed.
Added test coverage for some corner cases of WLS, which revealed a bug in WLS. Added test coverage for norm_resid, which was also incorrect. Added exception checks for GLS sigma with wrong sizes. Added test for QR where Q,R are user provided. Revealed a bug in this code.
Fixes bugs mostly in checks for correctness on input for GLS and WLS for the sigma or weights. norm_resid now produces the output described in the doc string
|
I have expanded the test coverage and fixed three bugs (which the tests found) in the latest commit. |
There was a problem hiding this comment.
Stray print or is this intentional?
There was a problem hiding this comment.
Do we need the prints? I don't think standard output is suppressed by nose, though I can't recall.
The corner case of using pre-computed QR did not check all required inputs were available. Slight improvement in test coverage. Added test for norm resid when model fits perfectly. Fixes test for incorrect sigma array test. Fixes test for direct vs computed QR eigenvalues.
There was a problem hiding this comment.
why did you add another nobs here?
There was a problem hiding this comment.
Aren’t there 3 %s split across 2 lines? PyCharm gave a warning.
Kevin
There was a problem hiding this comment.
Yes there are, but I didn't see the one from the first line.
|
Looks good, no problem merging. Is behind master, but in a straight line in the network. I prefer a rebase before merging. @bashtage After this is merged, you could delete your master branch and get a clean branch by creating a new master branch from statsmodels/master. And then it's better to make all changes in "feature" branches. |
|
Yes, that is the plan. The whole master thing was not the right strategy. |
BUG: Replaced log(det(x)) with slogdet(x) to avoid numerical problems in loglike
ENH: Many typos fixed
ENH: Better PEP8 compliance in a few places