Skip to content

Let eta and eta_RM vary over time - #1297

Draft
marcelolafleur wants to merge 4 commits into
PSLmodels:masterfrom
marcelolafleur:eta-time-path
Draft

marcelolafleur wants to merge 4 commits into
PSLmodels:masterfrom
marcelolafleur:eta-time-path

Conversation

@marcelolafleur

Copy link
Copy Markdown
Contributor

Government transfers and remittances are shared out across ages and income groups by eta and eta_RM. Each was a single age-by-group matrix used in every year. When the population changes over the transition, a fixed matrix gives each age the same slice of the total however many people are in it, so each person's transfer drifts away from its intended profile. In OG-ETH, where the population ages fast, the poorest 85-year-olds ended up receiving about 11 times their intended transfer, and up to 80 times at 95.

This lets both parameters take a path by year, like omega and rho. A single matrix is still accepted and held constant over time (as is the older year-by-age form of eta_RM), so existing calibrations get the same parameters, bit for bit. Specifications now also warns when a year's shares do not add up to one, since households would then receive a different total than the aggregate.

Tests check that both parameters accept either form and that a single matrix gives the same parameters as before. The CI test selection passes locally (872 passed).

Government transfers are shared out by eta, held at one age-by-group
matrix in every year. As the population ages, each person's transfer
then drifts away from its intended profile. eta now takes a
(T+S) x S x J path, like omega and rho. An S x J matrix is still
accepted and held constant over time, so existing inputs give the
same model parameters, bit for bit.
…o one

Remittances are shared out by eta_RM the same way transfers are shared
out by eta, so it gets the same (T+S) x S x J path. Older 2-D inputs,
S x J or T x S, give the same model parameters as before. A warning
now flags any period where eta or eta_RM does not sum to one, since
households would then receive a different total than the aggregate.
@codecov-commenter

codecov-commenter commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.22%. Comparing base (aa6c019) to head (50d238b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1297      +/-   ##
==========================================
+ Coverage   80.16%   80.22%   +0.06%     
==========================================
  Files          24       24              
  Lines        7223     7245      +22     
==========================================
+ Hits         5790     5812      +22     
  Misses       1433     1433              
Flag Coverage Δ
unittests 80.22% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ogcore/__init__.py 100.00% <100.00%> (ø)
ogcore/parameters.py 91.39% <100.00%> (+0.54%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants