-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
DiscreteDistribution point masses to be a private attribute #623
Comments
This field is currently named X because that was the parameter name in the old function from which this code was derived. I think improving this may involve untangling and revising more of the HARK code. For comparison, it looks like neither Mathematica nor PyMC3 expose the point values of a discrete distribution. It's possible that with better designed code, this is not so necessary: If I'm reading things right, in the original HARK design, The design here is a bit baffling because in I'd love to simplify things down into a cleaner design and given the comments on #538 it seems like this is an area that hasn't been given much thought since it was originally written and a refactor is welcome, in principle. It doesn't look like it's possible to do this cleanly with a dedicated, generic distribution object like what in Mathematica is a LogMultiNormal distribution: This would be inappropriate for two reasons:
Later, when the shock distributions are actually sampled, it looks like the HARK/HARK/ConsumptionSaving/ConsIndShockModel.py Lines 2160 to 2167 in 8073a17
Long story short: the This change will ripple through the codebase and to downstream code, but seems desirable. |
Notes from today's meeting: The idea is to have flexibility for a multivariate distribution where the variables are not independent. Ideally, there should be a multivariate distribution object from which it is possible to extract the marginal distributions, with various options for methods of discretization and approximation. |
This issue is awkwardly named; I see now that this simple "name change" implicates several other issues, including #120 and #625. It may require further review to determine the right short term solution. One may be: through |
The way to think about this is to think about the discretized distributions generically as approximations to idealized continuous distributions. So, for example, we might want to say that the setup is one in which the "truth" is that the permanent shocks to idiosyncratic permanent income and to aggregate stock returns are jointly lognormally distributed with a covariance coefficient of 0.1. But in practice any numerical solution will have to approximate that with some particular discretization of the relationship, which is a matrix. Among competing discretizations, we want to have an unambiguous standard of "which one is closer to being right" -- in case the models differ in some important prediction. We want the unambiguous answer to be "whichever one is closer to the answer you get as you increase the fidelity of the discrete approximation to the continuous assumption." A 1000x1000 approximation is going to give a closer approximation than a 3x3 approximation. So whichever discretization gives an answer closer to the more accurate approximation is right. So, it is not worthwhile to devote any effort to trying to efficiently meld the unemployment shock with the transitory shock. The interesting questions will all have to do with either (a) correlations between the transitory and permanent shocks; or (b) correlations between the unemployment shock and either transitory or permanent shocks (conditional on not becoming unemployed). PS. I'd really, really like to get into HARK 1.0 the default of our distributions being ones with point masses at the min and max values of some standard deviation, per the discussion elsewhere. Matt and I strongly agree on this subject, for deep and powerful reasons. We both wish I'd done it a long time ago (like, 20 years ago). It's clearly the right way to do things. |
Is there an existing issue for this? If not, could you make one describing what you mean? |
I suppose this will be fixed as part of #640 then. Looks like this ticket can be closed as its scope is covered in better detail in other issues. |
X
is not a good attribute name.Better to use something more reflective of the mathematical term
The text was updated successfully, but these errors were encountered: