Example implementation of the lifecycle model from Mahler & Yum (2024).
Three regimes represent working life, mandatory retirement from age 65, and death. The working regime has nine states: wealth, health, productivity shock, lagged effort, adjustment cost, education, productivity type, health type, and discount type. Its three actions are labor supply, saving, and health effort. Retirement removes labor supply, productivity type, and the productivity shock because they no longer affect the model. The model features stochastic health and regime transitions, AR(1) productivity shocks, and discount-factor heterogeneity. It ships with calibrated data files for survival probabilities and initial distributions.
in a CUDA environment (e.g., `pixi run -e cuda13 python your_script.py`). ::::
[View source on GitHub](https://github.com/OpenSourceEconomics/pylcm/blob/main/src/lcm_examples/mahler_yum_2024/__init__.py)
## Usage
```python
from lcm_examples.mahler_yum_2024 import (
MAHLER_YUM_MODEL,
START_PARAMS,
create_inputs,
)
model_params, initial_conditions = create_inputs(
seed=7235,
n_simulation_subjects=1_000,
params=START_PARAMS,
)
result = MAHLER_YUM_MODEL.simulate(
params=model_params,
initial_conditions=initial_conditions,
period_to_regime_to_V_arr=None,
log_level="debug",
seed=8295,
)
```- Mahler, L., & Yum, M. (2024). Lifestyle Behaviors and Wealth-Health Gaps in Germany. Econometrica, 92(5), 1697–1733. 10.3982/ECTA20603