You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On this branch, I test the results of lcm against the analytical solution by Iskhakov et al. (2017). In this model, agents face a discrete retirement decision (absorbing state) and a continuous consumption decision.
When testing the value function of lcm, I set up the model in the following way. Note that the wealth and consumption grid starts at 0 and there are T=3 periods.
I included 0 in the consumption and wealth grid because I think this is necessary in order to correctly test the numerical results against an analytical solution. Else, retired agents being in the n-1 lowest possible states (in an n period problem with equal consumption and wealth grid) would necessarily violate their budget constraint, which produces incorrect results that may spill over to the other states.
The -inf in the second entry is due to the value function being computed on a grid, this doesn't show up in the analytical solution (only the first -inf entry is correct). What surprises me is that the following values on the grid are imprecise as well. When working on a grid with 10_000 grid points, only after the 800th or so grid points, results are always close up to 5 or 6 decimals. Maybe the issues at the first few grid points induce numerical imprecision somehow?
The solution for the workers coincides with the analytical solution.
Value function in period 1
I get a list of nan, both for the initially retired and for the agents still working. This problem does not occur if the minimum grid value is larger than 0.
The text was updated successfully, but these errors were encountered:
Changing the label from bug to enhancement, as we've noticed that these issued can be circumvented by using a very fine wealth grid. The enhancement must deal with the actual zero case.
I think it matters whether the utility value is actually undefined, or if it is negative infinity. I guess in the former case, LCM should throw an error, but in the latter, LCM should be able to handle the case without introducing NAs.
Nevertheless, I think once we decide on which behavior we expect from LCM we can open a new Issue requesting it and close this Issue.
After talking to @hmgaudecker, we realized that we also do not want to handle the "negative infinity" case, but want to throw an error in both cases. Moved to #55.
Problem description
On this branch, I test the results of lcm against the analytical solution by Iskhakov et al. (2017). In this model, agents face a discrete retirement decision (absorbing state) and a continuous consumption decision.
When testing the value function of lcm, I set up the model in the following way. Note that the wealth and consumption grid starts at 0 and there are T=3 periods.
I included 0 in the consumption and wealth grid because I think this is necessary in order to correctly test the numerical results against an analytical solution. Else, retired agents being in the n-1 lowest possible states (in an n period problem with equal consumption and wealth grid) would necessarily violate their budget constraint, which produces incorrect results that may spill over to the other states.
The value functions of the first two periods (for the retired agent) seem to be wrong. The last period value function is correct.
Value function in period 2
For the initially retired, I get the following result for the value function on the wealth grid:
The correct/analytical solution would be:
The
-inf
in the second entry is due to the value function being computed on a grid, this doesn't show up in the analytical solution (only the first-inf
entry is correct). What surprises me is that the following values on the grid are imprecise as well. When working on a grid with 10_000 grid points, only after the 800th or so grid points, results are always close up to 5 or 6 decimals. Maybe the issues at the first few grid points induce numerical imprecision somehow?The solution for the workers coincides with the analytical solution.
Value function in period 1
I get a list of
nan
, both for the initially retired and for the agents still working. This problem does not occur if the minimum grid value is larger than 0.The text was updated successfully, but these errors were encountered: