Merged
Conversation
Adds a new income process constructor that incorporates Mateo's seven point medical expense shock distribution (by five year age blocks), from his JMP. HS and college specifications are tested.
Contributor
Author
|
This PR is meant to address #1500 |
My results don't quite match theirs, so I need to work on this a little. Also fixed mistakes in the yaml file, and added option for a zero medical needs shock probability.
These fit their target moments better when using HARK's lognormal discretizer.
alanlujan91
approved these changes
Feb 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds calibration support for expense/medical shocks by introducing a new income-process constructor that treats medical expenses as negative transitory income shocks (Velasquez-Giraldo 7-point-by-age-block spec), and aligns MedShock model outputs/tests/docs to use MedLvl.
Changes:
- Add
construct_lognormal_income_process_with_mvg_medical_expensesand tests validating the expanded transitory shock support size by age. - Update MedShock model tracking/control naming from
MedtoMedLvlacross code, tests, and example notebook. - Introduce a
Fulford_and_Low_paramsparameter dictionary and document changes in the changelog.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ConsumptionSaving/test_modelInits.py | Adds tests exercising the new MVG medical-expense income process constructor. |
| tests/ConsumptionSaving/test_ConsMedModel.py | Updates simulation tracking key from Med to MedLvl. |
| examples/ConsMedModel/MedShockConsumerType.ipynb | Updates tracked variable and plotting to use MedLvl. |
| docs/CHANGELOG.md | Notes the new constructor and related updates. |
| HARK/models/ConsMedShock.yaml | Updates policy function naming/call signature to return (cLvl, MedLvl, xLvl). |
| HARK/ConsumptionSaving/ConsMedModel.py | Adds zero-probability support for MedShk discretization, introduces Fulford & Low params, and renames tracked med variable to MedLvl. |
| HARK/Calibration/Income/IncomeProcesses.py | Adds MVG medical-expense income process constructor (expense shocks as negative transitory income). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…-ark/HARK into AddExpenseShockCalibrations
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first commit adds a new income process constructor that incorporates Mateo's seven point medical expense shock distribution (by five year age blocks), from his JMP. HS and college specifications are tested. His approach specifies medical expenses as negative transitory income shocks.
The next commit will add Fulford and Low's estimation result from the earlier version of their paper, which uses
PrefShockConsumerType or KinkyPrefConsumerTypeMedShockConsumerType.