-
-
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
Specify bounds on multivariate distributions #1479
Open
mnwhite
wants to merge
10
commits into
master
Choose a base branch
from
BoundsOnMultivariateDstns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+220
−51
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.