PolicyEngine / PolicyEngine/microcosm-dynamics

Candidate 2 design: latent-permanent conditioned chained QRF (research memo)

Open
#42 144 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
1
Avg merge
1h 46m
Merged PRs (30d)
28

Description

Research memo for the candidate that follows the failed baseline (#40). Gate 1 stays locked; candidate 2 runs through the same protocol on the same paired splits, and its model description should be registered in this issue before the run.

1. What the locked references demand — a three-moment back-out

The committed battery autocorrelations (log earnings among positives, biennial lags 1/2/5 = 2/4/10 years) are 0.7301 / 0.6572 / 0.5389. Fitting candidate structures to exactly these three numbers:

structure implied 10yr autocorr vs locked band [0.469, 0.609]
AR(1) chain (the baseline's linear analogue) 0.207 far outside
AR(2) — "condition on two lags" (Yule–Walker fit to lags 1–2) 0.396 still outside
permanent + AR(1) transitory + white noise 0.539 exact by construction

The three-component model fits all three committed moments exactly with permanent share 0.467, transitory share 0.364 (biennial ρ = 0.722 ≈ 0.85 annualized), noise share 0.169. The long-run autocorrelation asymptote equals the permanent share — no finite-lag chain, however nonlinear, can hold a ~0.47 floor forever; the baseline run measured exactly this (1-lag QRF: 10yr autocorr 0.31–0.37 — nonlinearity buys ~+0.13 over the linear 0.207, structurally short). The noise share of 0.169 is consistent with the PSID validation literature on reporting error (Pischke 1995; Bound & Krueger's mean-reverting error), which also cautions against pushing the chain to reproduce lag-0 variance too literally.

Conclusion: candidate 2 must carry an explicit latent person-level state. Two extra lags provably cannot do it; a permanent component is not one option among several, it is what the committed moments identify.

2. Literature mapping (all verified)

  • Arellano, Blundell & Bonhomme (2017, Econometrica 85:693–734) — the theoretical home for our machinery: log earnings = a general Markovian persistent component plus a transitory innovation, estimated with quantile-based methods; persistence varies with the size and sign of the current shock (nonlinear persistence, conditional skewness). A chained QRF conditioned on a latent persistent state is the simulation-native analogue of this framework.
  • Guvenen, Karahan, Ozkan & Song (2021, Econometrica 89:2303–2339) — administrative data on millions of workers: earnings changes are strongly non-Gaussian (negative skewness, kurtosis far above normal, varying by age and earnings level), and persistence is asymmetric (positive changes for high earners are transitory; negative ones persistent; reversed for low earners). QRF quantile draws capture these facts natively where parametric AR components cannot — the reason to keep the QRF frame rather than switch to a parametric process.
  • Sabelhaus & Song (2010, JME 57:391–403) — permanent/transitory decomposition over the life cycle on SSA administrative earnings; already load-bearing in the paper's earnings section and the right external anchor for our fitted component shares.
  • Incumbent dynamic microsimulations already encode the permanent component. MINT projects earnings by splicing donor workers' observed histories onto targets and adds a person-specific fixed effect to regression projections — splicing preserves observed profile heterogeneity by construction (MINT I methods). DYNASIM carries an estimated individual-specific error term in its earnings equations. Gate 1 is demanding of us what the incumbents already build in.

3. Recommended design: latent-permanent conditioned chained QRF

Production-compatible with the backcast use case (one anchored observation per person), and implementable in populace-fit's existing chaining:

  1. Training (80% complement only): residualize log positive earnings on age; estimate each training person's permanent component as the empirical-Bayes-shrunk within-person mean of residuals (shrinkage handles short observed spells).
  2. Anchor stage: fit QRF_perm ~ P(perm | anchor-period covariates: anchor earnings, age at anchor). At generation, draw each holdout person's perm from this conditional — never estimate it from holdout data (protocol: holdout persons are excluded from all fitting; their perm is a model draw conditioned only on the anchor row the production use case also has).
  3. Chain stage: the existing backward one-step chain, now conditioned on the latent draw: earnings at t−2 ~ QRF(earnings at t, perm, age at t−2). Regime gate unchanged (participation conditions on perm too, which should also help zero-spell structure).

Why it passes structurally: conditioning every step on a persistent latent state puts a floor under long-horizon autocorrelation equal to the share of variance the drawn perm explains — the exact quantity the back-out says must be ≈ 0.47 — while the QRF supplies ABB-style nonlinear persistence and GKOS-style non-Gaussian shocks within each step. The honest uncertainty is that P(perm | one anchor year) is wide; that spread is real and belongs in the draws.

Alternatives considered and ranked below it:

  • Two-lag conditioning only — rejected above; the linear benchmark (0.396) sits outside the locked band before nonlinearity, and the burden it must close (~0.14) exceeds what nonlinearity bought at one lag (~0.13) starting from much further away.
  • Full ABB quantile-AR estimation — estimates the latent process with quantile regressions and simulates from it; theoretically cleanest but duplicates what QRF chaining does natively at higher implementation cost; better used later as a cross-check.
  • GKOS-style parametric mixture process — benchmark-grade moments but abandons the nonparametric frame and its automatic covariate conditioning; useful as an external comparison line in the paper, not as the candidate.
  • MINT-style splicing — preserves heterogeneity by construction and is a strong sanity baseline, but it cannot condition on arbitrary covariates or extend to the full transition system; worth reporting as a comparison row if cheap.

4. Pre-registration discipline for the run

Same locked gate, same paired splits (seeds 0–4), one shot, no tuning against holdout scores. Before the run, this issue gets a comment registering the exact candidate spec (feature list, shrinkage rule, QRF defaults); the run publishes pass or fail, as #40 did.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating populace's existing backward one-step QRF chaining and the current regime gate. Implement the proposed training, anchor, and chain stages using only the training complement, then register the feature list, shrinkage rule, and QRF defaults before running the same paired splits for seeds 0–4. Done means the run publishes a pass or fail against the locked gate without holdout tuning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.