PerfForesightConsumerType can't handle CRRA of 1.0
Opened this issue · 3 comments
DominicWC commented
Describe the bug
Trying to run the .solve() method for an PerfForesightConsumerType throws an error when CRRA is 1.0. Other agent types don't throw this error.
To Reproduce
from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType
agent=PerfForesightConsumerType()
agent.CRRA=1.0
agent.solve()
Expected behavior
The model should be able to compile without errors.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows
- Browser Firefox
- Econ-ARK and Python version 0.13.0 and Python 3.9.13
Additional context
mnwhite commented
I thought we fixed this years ago, ugh.
…On Tue, Jun 27, 2023 at 8:59 PM DominicWC ***@***.***> wrote:
*Describe the bug*
Trying to run the .solve() method for an PerfForesightConsumerType throws
an error when CRRA is 1.0. Other agent types don't throw this error.
*To Reproduce*
from HARK.ConsumptionSaving.ConsIndShockModel import
PerfForesightConsumerType
agent=PerfForesightConsumerType()
agent.CRRA=1.0
agent.solve()
*Expected behavior*
The model should be able to compile without errors.
*Screenshots*
If applicable, add screenshots to help explain your problem.
*Desktop (please complete the following information):*
- OS: Windows
- Browser Firefox
- Econ-ARK and Python version 0.13.0 and Python 3.9.13
*Additional context*
—
Reply to this email directly, view it on GitHub
<#1293>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFO7Y4YYL57FW6ZPFSDXNN6XNANCNFSM6AAAAAAZWKLU5I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
alanlujan91 commented
there's a lot of hardcoded 1.0 - self.CRRA
throughout the code base. I'm surprised other models run for CRRA = 1.0
mnwhite commented
I think at some point someone went through and fixed the 1-CRRA stuff and
had it refer to utility functions instead, and the utility functions should
correctly handle CRRA=1. Maybe that's not the case.
The code *definitely* will break down for CRRA ~= 1, for numeric reasons.
…On Wed, Jun 28, 2023 at 11:06 AM Alan Lujan ***@***.***> wrote:
there's a lot of hardcoded 1.0 - self.CRRA throughout the code base. I'm
surprised other models run for CRRA = 1.0
—
Reply to this email directly, view it on GitHub
<#1293 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFJVNBGKTOV6WKQC32LXNRB57ANCNFSM6AAAAAAZWKLU5I>
.
You are receiving this because you commented.Message ID:
***@***.***>