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's for MarkovConsumerType don't work. #1478

Open
DominicWC opened this issue Aug 8, 2024 · 1 comment
Open

Default's for MarkovConsumerType don't work. #1478

DominicWC opened this issue Aug 8, 2024 · 1 comment

Comments

@DominicWC
Copy link
Collaborator

DominicWC commented Aug 8, 2024

Describe the bug
The default constructor for the income distributions for MarkovConsumerType don't create unique distributions for each state, leading HARK to throw an error.

To Reproduce
Run:

from HARK.ConsumptionSaving.ConsMarkovModel import MarkovConsumerType
MarkovExample = MarkovConsumerType()
MarkovExample.solve()

Expected behavior
The model should solve without issue.

Error message:
File ~\Desktop\Econ Ark Work\HARK\HARK\ConsumptionSaving\ConsMarkovModel.py:821, in MarkovConsumerType.check_markov_inputs(self)
[819] for IncShkDstn_t in self.IncShkDstn:
[820] if not isinstance(IncShkDstn_t, list):
--> [821] raise ValueError(
[822] "self.IncShkDstn is time varying and so must be a list"
[823] + "of lists of Distributions, one per Markov State. Found "
[824] + f"{self.IncShkDstn} instead"
[825] )
[826] elif len(IncShkDstn_t) != StateCount:
[827] raise ValueError(
[828] "List in IncShkDstn is not the right length, it should be length equal to number of states"
[829] )

ValueError: self.IncShkDstn is time varying and so must be a listof lists of Distributions, one per Markov State. Found <HARK.distribution.IndexDistribution object at 0x00000244DDBA7AD0> instead

@DominicWC
Copy link
Collaborator Author

Markov Consumer Type also doesn't accept a time-varying Rfree like most other models do.

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

No branches or pull requests

1 participant