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

Use 1 point for degenerate income distributions #1115

Merged
merged 2 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Release Date: TBD

### Minor Changes

* Updates the lognormal-income-process constructor from `ConsIndShockModel.py` to use `IndexDistribution`. [#1024](https://github.com/econ-ark/HARK/pull/1024)
* Updates the lognormal-income-process constructor from `ConsIndShockModel.py` to use `IndexDistribution`. [#1024](https://github.com/econ-ark/HARK/pull/1024), [#1115](https://github.com/econ-ark/HARK/pull/1115)
* Allows for age-varying unemployment probabilities and replacement incomes with the lognormal income process constructor. [#1112](https://github.com/econ-ark/HARK/pull/1112)

### 0.12.0
Expand Down
10 changes: 7 additions & 3 deletions HARK/ConsumptionSaving/ConsIndShockModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2790,7 +2790,9 @@ class LognormPermIncShk(DiscreteDistribution):
def __init__(self, sigma, n_approx, neutral_measure=False, seed=0):

# Construct an auxiliary discretized normal
logn_approx = MeanOneLogNormal(sigma).approx(n_approx, tail_N=0)
logn_approx = MeanOneLogNormal(sigma).approx(
n_approx if sigma > 0.0 else 1, tail_N=0
)
# Change the pmf if necessary
if neutral_measure:
logn_approx.pmf = logn_approx.X * logn_approx.pmf
Expand Down Expand Up @@ -2825,8 +2827,10 @@ class MixtureTranIncShk(DiscreteDistribution):

def __init__(self, sigma, UnempPrb, IncUnemp, n_approx, seed=0):

dstn_approx = MeanOneLogNormal(sigma).approx(n_approx, tail_N=0)
if UnempPrb > 0:
dstn_approx = MeanOneLogNormal(sigma).approx(
n_approx if sigma > 0.0 else 1, tail_N=0
)
if UnempPrb > 0.0:
dstn_approx = add_discrete_outcome_constant_mean(
dstn_approx, p=UnempPrb, x=IncUnemp
)
Expand Down