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

Better documentation and use of lognormal parameters #1003

Closed
sbenthall opened this issue Apr 21, 2021 · 0 comments · Fixed by #1019
Closed

Better documentation and use of lognormal parameters #1003

sbenthall opened this issue Apr 21, 2021 · 0 comments · Fixed by #1019
Assignees
Milestone

Comments

@sbenthall
Copy link
Contributor

The Distribution.LogNormal class takes two parameters, mu and sigma.

These are the mean and standard deviation for the underlying normal distribution:

https://github.com/econ-ark/HARK/blob/master/HARK/distribution.py#L89

https://numpy.org/doc/stable/reference/random/generated/numpy.random.lognormal.html

This could be made more clear in the documentation.

There is a separate method for creating the lognormal from the values of its own mean and standard deviation.

https://github.com/econ-ark/HARK/blob/master/HARK/distribution.py#L202

This latter method is used in update_RiskyDstn:

https://github.com/econ-ark/HARK/blob/master/HARK/ConsumptionSaving/ConsPortfolioModel.py#L209-L249

RiskyDstn is used in the solver.

But the true mean/sigma factory method is not used in get_Risky:

https://github.com/econ-ark/HARK/blob/master/HARK/ConsumptionSaving/ConsPortfolioModel.py#L339-L367

which is used for drawing the shocks in forward simulation.

This is a bit confusing.

@sbenthall sbenthall added this to the 1.0.0 milestone Apr 21, 2021
@sbenthall sbenthall self-assigned this Jun 15, 2021
sbenthall added a commit to sbenthall/HARK that referenced this issue Jun 18, 2021
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

Successfully merging a pull request may close this issue.

1 participant