Repository navigation
ENH: add the Edgeworth expansion based on the normal distribution - #1325
Conversation
|
Thanks Evgeni, it might take me a bit of time going back to this. as motivation: |
|
Well, I guess one advantage of this is that at least some part of the math is checked (FWIW) and covered by tests. |
|
My guess is that it's a backwards compatibility issue. TravisCI uses the default scipy, which is 0.9.0 in Ubuntu precise |
There was a problem hiding this comment.
given the test failure, I think kwds needs to include name
|
It looks like you use two features of the distributions that are only in very recent scipy. |
|
After fixing the issues with the name and named args, there's still a numerical problem of some sort. Locally, all tests pass with scipy master, but with scipy 0.9 it fails to reconstruct a chi-square distribution [same failure on TravisCI]: pdf starts oscillating much earlier, hence ppf cannot be defined etc. Am wondering what were the relevant changes between 0.9 and 0.13. Will have a look into it. |
|
the ppf brentq error is also because of a previous version of the ppf inversion that had fixed limits, It was change in scipy to use an expanding search if the f at the bounds don't have the same sign. Note the old version required a large xa and xb to be set in the definition of the distribution. I haven't tried the example, and don't know why the function itself would be different. |
|
Excuse to bump scipy version in master for 0.6.0? |
|
Also time to discuss numpy version? |
|
Ubuntu LTS (recent scikit-learn discussion) ? some of the goodies in scipy are too recent and we would have to bump too high, many of Evgeni's improvements are only one release old. Do we need to move to more recent numpy than 1.6 ? |
|
The current LTS has numpy 1.6 already. As far as this one is concerned:
So far I did not manage to have a proper look at the failure beyond noticing that a (rather strange) combination of numpy 1.8 and scipy 0.9 still fails. |
|
Can you rebase this on master? We've bumped our minimum versions and we'll see how Travis does now. |
|
@jseabold Done. I don't have a proper dev setup for statsmodels at the moment, so all I can say is that tests pass locally with scipy master & numpy 1.8. TravisCI? |
|
Yes, travis should let us know. |
|
Failure is unrelated. Good to merge? |
|
Might want to remove the old numpy compat for _hermite (will do tomorrow) |
|
Ok. Ping the PR when it's ready. (I won't be online tomorrow, likely). |
|
Done. |
|
Thanks. Would you mind also making a bullet point note in |
|
Added a line. Feel free to edit or expand if desired. |
|
It looks like this could go in after a rebase? |
Given a set of cumulants, construct a matching distribution as an asymptotic series starting from the normal distribution.
|
rebased |
|
I'm not sure why trying to import |
|
Thanks. Merge? The NoseWrapper circular imports happened with the recent warnings refactor. Probably needs a fix but not critical IMO. |
|
Gonna go ahead and merge this. Thanks. |
ENH: add the Edgeworth expansion based on the normal distribution
This PR adds the Edgeworth expansion (normal distribution + cumulants), as discussed in this ML thread:
https://groups.google.com/forum/#!topic/pystatsmodels/so83mPP9nkE
(time flies) No significant changes since that email exchange last year.