Skip to content

Commit

Permalink
Merge pull request #981 from Mv77/BugFix/Newborns
Browse files Browse the repository at this point in the history
Newborns' death probabilities.
sbenthall authored Jun 14, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents db6d206 + 680153e commit d5ca850
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions HARK/ConsumptionSaving/ConsIndShockModel.py
Original file line number Diff line number Diff line change
@@ -1732,6 +1732,13 @@ def sim_death(self):
DiePrb = DiePrb_by_t_cycle[
self.t_cycle - 1
] # Time has already advanced, so look back one

# In finite-horizon problems the previous line gives newborns the
# survival probability of the last non-terminal period. This is okay,
# however, since they will be instantly replaced by new newborns if
# they die.
# See: https://github.com/econ-ark/HARK/pull/981

DeathShks = Uniform(seed=self.RNG.randint(0, 2 ** 31 - 1)).draw(
N=self.AgentCount
)

0 comments on commit d5ca850

Please sign in to comment.