Skip to content
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
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

mnwhite
Copy link
Contributor

@mnwhite mnwhite commented Aug 13, 2024

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 the limit dictionary, but its functionality has now been extended to include infimum and supremum entries, and for these to be handled correctly by combine_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.

  • Tests for new functionality/models or Tests to reproduce the bug-fix in code.
  • Updated documentation of features that add new functionality.
  • Update CHANGELOG.md with major/minor changes.

mnwhite added 3 commits July 25, 2024 16:03
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.
@mnwhite
Copy link
Contributor Author

mnwhite commented Aug 13, 2024

@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?

@mnwhite
Copy link
Contributor Author

mnwhite commented Dec 10, 2024

This probably needs to be completely re-done because of #1496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant