Skip to content

Commit

Permalink
Merge pull request #1115 from Mv77/income_process
Browse files Browse the repository at this point in the history
Use 1 point for degenerate income distributions
  • Loading branch information
sbenthall authored Feb 23, 2022
2 parents ea73795 + 731e9a9 commit 413e6d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit 413e6d6

Please sign in to comment.