-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multivariate normal with discrete approximation #948
Conversation
@Mv77 this looks great! I'd propose that a good test of it would be to implement the multivariate lognormal you mention as an easy application, because it should be easy to compare that to something that surely must exist which is some kind of tool for calculating the CDFs of continuous multivariate lognormals. |
@Mv77, I'd like to merge this in if you will resolve the conflicts. |
# Conflicts: # HARK/tests/test_distribution.py
Great, I've just resolved them. This should be ready to merge after tests pass. |
Codecov Report
@@ Coverage Diff @@
## master #948 +/- ##
==========================================
+ Coverage 71.67% 71.76% +0.09%
==========================================
Files 63 63
Lines 9197 9256 +59
==========================================
+ Hits 6592 6643 +51
- Misses 2605 2613 +8
Continue to review full report at Codecov.
|
#120 Requests methods to deal with correlated discretized RVs.
This PR adds a multivariate normal distribution class, with a discretization method.
The idea for approximating an N-variate normal is:
CombineIndepDstns
, taking the product of their grids (so you get an N-dimensional grid) and multiplying their pmfs.I have not found a citation for this, and I'm not familiar with the literature, so I'm not sure if this is inaccurate or inefficient. It seems to work well in my tests.
A multivariate log-normal like the one requested in #120 should be easily derivable from this.
@llorracc @sbenthall what do you think?