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

default arguments for Markov economy fail on getEconomyData step #557

Open
sbenthall opened this issue Mar 6, 2020 · 4 comments
Open

default arguments for Markov economy fail on getEconomyData step #557

sbenthall opened this issue Mar 6, 2020 · 4 comments
Assignees
Milestone

Comments

@sbenthall
Copy link
Contributor

Running this code, simplified from KrusellSmith DemARK:

from HARK.ConsumptionSaving.ConsAggShockModel import AggShockMarkovConsumerType, CobbDouglasMarkovEconomy

agent = AggShockMarkovConsumerType()
economy = CobbDouglasMarkovEconomy(
    agents = [agent])

agent.getEconomyData(economy) # Makes attributes of the economy, attributes of the agent
``

Gets this error:

$ python consagg.py
Traceback (most recent call last):
File "consagg.py", line 7, in
agent.getEconomyData(economy) # Makes attributes of the economy, attributes of the agent
File "/home/sb/projects/econ-ark/HARK/HARK/ConsumptionSaving/ConsAggShockModel.py", line 170, in getEconomyData
self.addAggShkDstn(Economy.AggShkDstn) # Combine idiosyncratic and aggregate shocks into one dstn
File "/home/sb/projects/econ-ark/HARK/HARK/ConsumptionSaving/ConsAggShockModel.py", line 400, in addAggShkDstn
self.IncomeDstn = self.IncomeDstnWithoutAggShocks
AttributeError: 'AggShockMarkovConsumerType' object has no attribute 'IncomeDstnWithoutAggShocks'


If this is the correct way to call this function, the default parameters for the two classes should support it without error
@mnwhite
Copy link
Contributor

mnwhite commented Mar 6, 2020 via email

@sbenthall
Copy link
Contributor Author

Ok, since you seem to understand a fix for this, I'll assign this ticket to you @mnwhite

@sbenthall sbenthall added this to the 1.0.0 milestone Jan 29, 2021
@sbenthall
Copy link
Contributor Author

Punting until 1.1 because @mnwhite is currently unavailable

@sbenthall sbenthall modified the milestones: 1.0.0, 1.1.0 Feb 11, 2021
@mnwhite
Copy link
Contributor

mnwhite commented Jul 3, 2024

I believe this is still an outstanding issue, but is significantly easier to tackle with the constructors framework.

To be clear: I'm fairly sure that the AggShockMarkov model doesn't initialize properly with default parameters.

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

No branches or pull requests

2 participants