-
-
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
Specify bounds on multivariate distributions #1479
base: master
Are you sure you want to change the base?
Conversation
The limit attribute of a DiscreteDistribution has data about the continuous distribution from which it was derived. This dictionary now contains infimum and supremum fields, which are also derived from the original distribution. It's present for *at least* the income distributions used by ConsIndShock.
I made these changes almost three weeks ago but forgot to commit. The solver for ConsIndShock now uses information in the limit dictionary of IncShkDstn when determining the "worst income shock", under the assumption that the "joint infimum" exists. As a default backup, it uses the lowest discretized shock, like before. This does not really change the behavior of the solution unless you both add points *extremely* close to zero into aXtraGrid *and* actually include the infimum (as a tiny point mass) in the discretization itself.
Some consumption function test targets moved in the 5th digit because of the code changes. Targets have been adjusted. Probably still some tests failing.
Also fixed inf/sup for Uniform class. One or two tests might still fail.
Order of arguments was wrong on np.arange, and BoroCnstArt needs to be zero to compare to riskless ConsIndShock after changes. Also fixed issue with dimensionality of supremum and infimum.
In order for the KinkedR model to actually do anything, the infimum of the true income distribution has to be ignored.
@DominicWC The remaining failed test is a weird documentation error with ARKitecture.md, involving a reference to '8'. I know that 6 is scared of 7, but I'm not sure what 8 ever did to anyone. Help? |
This probably needs to be completely re-done because of #1496 |
I'm going to prioritize getting these changes moved into the (new) correct files. Alan did a rearrangement of the content in distribution.py, so my changes now point to a removed/dummy file. This is the only remaining substantive PR that I want to get merged before we do a version release. There are 2-3 PRs that revise example notebooks that maybe should also get merged. |
The
limit
attribute of DiscreteDistribution instances links to the underlying continuous distribution from which it was generated, and also has information about the discretization parameters. There's still some work to be done on standardizing thelimit
dictionary, but its functionality has now been extended to includeinfimum
andsupremum
entries, and for these to be handled correctly bycombine_independent_discrete_dstns
. The information in these entries (the bounds on each dimension of the distribution) is now used by ConsIndShock's solver to find the "worst income shock realization".As described in the commit notes, this doesn't actually affect the consumption function solution very much. The user needs to both add aXtra points very close to zero and include a tiny point mass at the infimum for the consumption function to actually have gridpoints on the "almost constrained" portion.