dynamics / learn

How the model works, and how to check it

Microcosm Dynamics is a computer model of Social Security's retirement, survivor and disability benefits that anyone can download, run and check. This page explains how it works, how we test it and what those tests do and do not show, then lets you quiz yourself. It follows the working paper of October 2026. If this page and the paper ever disagree, trust the paper.

Watch it work

A dynamic microsimulation follows people, not averages. The diagram follows 12 made-up people; each line is one person. Left of the dashed line are years for which the Panel Study of Income Dynamics (PSID) recorded earnings; right of it are years the model simulates. Earnings bands grow thicker and darker as a person earns more. Filled violet dots joined by a line mark a marriage, open violet rings mark a birth, bronze rings mark a benefit claim between 62 and 70, and a line ends when the person dies. A line that is thicker overall stands for more people, as survey weights do. Faint dashes mark the odd years from 1997 on, which the model fills in from neighboring years (see missing years). The shaded band marks 2015 to 2019, the years scored by the holdout test; for that test, the model learned only from data through 2014. The strip at the bottom tracks the share of these 12 people who have claimed benefits.

1968
earnings (darker, thicker = more) thicker overall = stands for more people marriage birth benefit claim death simulated years filled-in year scored by the holdout test, 2015–19

Made-up people, drawn for teaching; no real PSID respondent appears. The diagram shows how the model is designed to work, not a run. Two of the blind tests against DYNASIM3, the previous generation of the Urban Institute's model (below), start from the families the PSID interviewed in 2011 and end in 2030; in them nobody earns, marries or divorces after 2010, and no one is born or immigrates. The holdout test's projection, which learned only from data through 2014, does project marriages and disability for 2015 to 2019 and earnings for 2016 and 2018.

The model

Some questions about Social Security need more than a snapshot of one year, such as which retirees a benefit cut reaches decades from now. Dynamic microsimulation answers them by aging a population of individual people year by year, drawing their earnings, marriages, disabilities, deaths and benefit claims, and applying the program's rules to each life. The Urban Institute's DYNASIM, the Social Security Administration's MINT and the Congressional Budget Office's long-term model, CBOLT, do this for Social Security. Outsiders can read the results these models publish, but CBO does not publish CBOLT's code, and we found no public code with which to rerun DYNASIM or MINT. We publish the code, estimates and tests of Microcosm Dynamics under the MIT license.

The model learns how lives unfold from the Panel Study of Income Dynamics, a University of Michigan survey that has followed a set of American families, and the new families their members form, since 1968. It takes the ages at which people claim benefits from the Social Security Administration's published awards. MINT and CBOLT run on SSA's administrative earnings records, and SSA has a legal obligation to protect the confidentiality of the people in them; anyone can obtain the PSID's data.

The model produces no cost estimates, no measure of Social Security's long-run balance and no date when the trust funds run out. It reports how a reform's effects differ across people, such as benefit changes by age group and poverty at 67.

Three layers

Which parts pass a gate

A gate is a test on data set aside from what the model learned from, or on outside data, that we register publicly before we run it. Its pass rule is fixed before each scored run and changes only by public amendment (more below).

ComponentStatus
Earnings histories the model generatesgate 1: passes, under two amendments
Forward earnings model, which projects earnings aheadgate m6: passes, 4 of 5 seeds, under one amendment; B2, which carries it from 2010 to 2014: fails
Filling the years recorded careers leave outgate_epuf_fill: the rules the blind tests use fail; a learned fill for the years before a career passes; a learned odd-year fill improves on the rule but is not certified
Marriage, divorce, remarriage, widowhood and birthsgate 2: passes on its 16th candidate, 4 of 5 seeds, under an amendment and a split into gates 2, 2b and 2c
Who lives with whomgate 2b: passes, 4 of 5 seeds; split off from gate 2
How marital status lines up with earningsgate 2c: passes, 4 of 5 seeds; split off from gate 2
Work-limiting disabilitygate m4: passes, 5 of 5 seeds
Carrying the PSID's patterns of change onto the CPS framegate w1: passes, under three amendments
Mortalityno gate
Claimingno gate
Who receives Social Security Disability Insurance (SSDI)no gate
Immigrants who enter on a scheduleno gate; output reported only

A candidate is a version of a piece that we register for one scored run. Several gates score each candidate on five seeds: starting numbers for the model's random draws, such as who dies or marries in a given year. "4 of 5 seeds" means the candidate passed on four of the five.

None of the four blind tests against DYNASIM3 (below) uses a component that passes a gate. The parts they use include the PSID's recorded earnings, mortality, the SSDI component, claiming and the Python benefit rules.

Inside each simulated year

Each simulated year, the engine takes every person's record through eight steps in a fixed order. Each step is a separate component that does its own calculations. The loop fixes only the order of the steps and the flow of marital status: the childbearing and household steps both read the one result the marital step produces, so every later step works from the same marriage history.

  1. Mortality. The model decides at random who dies each year, using death probabilities by age group and sex. No gate tests this step, or how death rates change over time. The projection tests use SSA's 2004 period life table, the death rates by age observed in 2004, scaled each year by the change in death rates that the Social Security Trustees' 2008 report projects.
  2. Aging. Everyone grows a year older.
  3. Marriage. The marital step updates each person's marital status. The marriage model that passes gate 2 covers marriage, divorce, remarriage and widowhood, but the projection tests do not use it: in them, a person becomes widowed when a linked spouse dies, and no one marries or divorces.
  4. Childbearing. This step decides who has a child, reading the marital step's result. Gate 2 scores births along with marriage. The projection tests add no newborns.
  5. Disability. This step models who reports a health problem that limits their work: who starts reporting one, who recovers, how many report one at a time, and how people leave near full retirement age. It passes gate m4, which compares it with PSID records set aside from what it learned from, and with the age pattern and mix of exits, but not the levels, of SSA's 2023 disability-insurance statistics. Work limitation is a different measure from receiving Social Security Disability Insurance (SSDI). The projection tests use a separate component, with no gate, that decides who receives SSDI: awards, recoveries and the switch to a retirement benefit at full retirement age, at rates observed through 2008.
  6. Earnings. The forward earnings model (the paper calls it the forward earnings law) decides at random, every two years, whether each person works and where they rank among earners. It then converts that rank to dollars using the national average wage index, which it projects by extending the 2005 to 2014 trend. It learned from PSID earnings through 2014 at ages 25 to 64; for anyone older, it reuses the pattern of its oldest age group. It passes gate m6 but fails B2, a registered test that carries it from 2010 to 2014, and no blind test uses it yet: the projection tests include no earnings after 2010 and count every later year as zero in the benefit formula.
  7. Claiming. The model picks each person's claim age at random, following SSA's published distribution of retired-worker awards by sex and year of entitlement (Annual Statistical Supplement, Table 6.B5.1). No gate tests this step, and no claim responds to a reform. For years after 2008, the projection tests reuse the 2008 distribution.
  8. Household composition. This step works out who lives with whom, reading the marital step's result. It passes gate 2b, but the projection tests do not use the gated household model.

Immigrants enter the population on a schedule, through a separate entry point in the loop. We report that output, no gate scores it, and the projection tests add no immigrants.

The model has three kinds of earnings. Recorded earnings are the labor income the PSID recorded for its family heads and spouses, with the gaps filled in or set to zero (see missing years). Generated earnings come from a backward-looking process that produces earnings careers, which passes gate 1. Projected earnings come from the forward earnings model above. The blind tests use only the recorded kind.

The engine draws its random numbers from separate, repeatable sequences: one for each draw, time period and step, and for each person where a step needs it. The same seed produces an identical projection.

Weights and missing years

How the PSID and the CPS frame fit together

The PSID knows how lives change; the CPS frame knows who the country is. The model is built to use both, and so far they meet in one place, gate w1.

The panel: PSID

The same families and their descendants, 1968–2023. The model learns from it how people earn, marry, divorce, have children, become disabled and die. We call these its patterns of change.

Knows how lives change. It is small: 9,152 families in 2023.

The cross-section: Microcosm's CPS frame

166,302 people in 57,240 households, for 2024. Microcosm calibrates its household weights to official totals, among them IRS income statistics, Social Security payments by benefit type and Census population counts by age.

Knows who the country is in one year, but not what happens to anyone next.

↘  ↙
Where they meet: gate w1

Gate w1 runs the patterns of change learned from the PSID on every adult in the frame, starting each adult's marital history from the frame's own share of married people at ages 25 to 34. It then scores the result against the frame on 43 snapshot statistics, covering earnings by age and sex, marital shares, spouses living together and one household-size share, plus one ordering check. It passes under three amendments, each adopted after a candidate failed; the candidate that passed is identical to the last one that failed. Together the amendments moved 21 other statistics out of the score, so we publish them without a pass mark, and narrowed the ordering check. The marital statistics at ages 25 to 34 are compared with the same frame numbers the starting histories read, so they test nothing new. The gate certifies no pattern of change, so any bias in how the PSID shows lives changing carries over to the frame.

↓ (not yet)
Projecting from the frame: not yet

The model is built to project from the frame, so that the frame supplies the population's size and makeup and the PSID supplies the patterns of change. No projection starts from the frame yet. Every projection so far starts from PSID members, and all four blind tests use PSID members with the PSID's own weights.

The division of labor, once both halves run together: the PSID supplies how lives change, and the CPS frame supplies who the country is. Today only gate w1 joins them.

How we test it: gates

Before we score a piece of the model, we post which statistics we will compare, which we call cells, and how close counts as a pass for each, its tolerance. We call such a test a gate: a test on data set aside from what the model learned from (held-out data), or on outside data, that we register publicly before we run it. The term comes from the quality gates that code must clear before it ships, and from the go/no-go decisions of clinical trials. A piece that faces a gate joins the model only after it passes.

Four gates pass only under amendments we adopted after an earlier candidate failed: gate 1 (generated earnings histories), gate 2 (marriage and childbearing), gate w1 (the CPS frame) and gate m6 (the holdout test). At gates 1 and w1, the candidate that passed is identical to one that failed under the old terms.

What gates cannot catch. A gate scored on the PSID tests whether the model reproduces the PSID, not how far the PSID departs from the country. Both halves that set its tolerances come from the same survey, which follows a population defined in 1968 and has lost members over time, so a bias they share goes undetected.

Gate 3 would score near-term outputs, such as beneficiary counts and average benefits, against annual administrative publications. It has no cells or tolerances yet and has never run.

The engine's holdout test

To test the projection engine as a whole, we let it learn only from data through 2014, projected forward and compared the projection with what the PSID recorded. Gate m6 scores projected changes in marital status and in disability for 2015 to 2019, and earnings statistics for 2016 and 2018. It scores only the people the PSID observed in each later round of interviews, and the scored run may use which people those were; an open forward projection, which no gate scores, gets no such information. The model treats 2020 to 2022 as a shock outside its scope; we publish the results for those years but score none of them.

We had already seen the years it scores. What the engine estimates came only from data through 2014, but not every design choice did. We chose the cells gate m6 scores, and the structure of the forward earnings model, with the PSID's records for 2015 onward in view.

Its terms changed after a failure. Candidate 1, the first version of the engine we scored, failed. We then adopted a public amendment with two parts. First, it restricts the earnings cells to people for whom the model estimated a 2014 earnings position; the engine fixes everyone else's earnings at zero instead of projecting them. That took 2,722 of the 13,163 people those cells had scored out of the earnings comparison. Second, it re-derives the noise floors from which those cells' tolerances are set. Candidate 2 failed under the amended terms. Candidate 3 passed, in 4 of 5 seeds.

The new floors loosened the low-earnings tolerance. The re-derived floors raised the tolerance on the 10th percentile of positive earnings at ages 25 to 44 from 0.221 to 0.284, on a log scale. In plain terms, the projection's figure may now fall short of the PSID's by up to about 25 percent, instead of about 20 percent. Three of candidate 3's four passing seeds score between those two values.

The passing version still differs from the PSID. In every seed, its remarriage rate runs 27 to 51 percent higher than the PSID's. At ages 25 to 44, its two-year earnings growth runs 2.7 to 5.2 log points (about 3 to 5 percentage points) lower, and its 10th percentile of positive earnings runs 15 to 24 percent lower. Its earnings also hold steadier: the correlation of a person's earnings four years apart, on a log scale, runs 0.74 to 0.76 in the projection against 0.67 to 0.71 in the PSID.

Gate m6 certifies nothing about how death rates or widowhood change over time, or about the people who enter the population, and no blind test uses the forward earnings model yet.

Four blind tests against DYNASIM3

The second kind of test compares the model with published results from DYNASIM3, the previous generation of the Urban Institute's model. For each test we post a plan, called a registration, in public before the run. A separate workstream, working apart from the model's builders, reads DYNASIM3's published numbers twice, independently, and seals them until we have saved the model's output to the public repository. No test has a pass mark: DYNASIM3 is another model, so each gap measures a disagreement between two models, not an error in either. None of the tests involves DYNASIM4, the current version, and none establishes that our model matches either version.

TestModel vs DYNASIM3
Cut each year's cost-of-living adjustment by one percentage point: change in average benefits in 2030, by age groupwithin 0.74 points in every age group
Raise the full retirement age to 68: change in average benefits at ages 65 to 69 in 2030−5.7% vs −9.9%
Cut every benefit by 13 percent: rise in the poverty rate at age 67 for people born 1936 to 1945, on a measure that counts income people could draw from their wealth+0.46 vs +2 points
Add a minimum benefit tied to years of work: share of beneficiaries 62 and older on it, headline version7.75% vs 6.3%

An interactive scorecard publishes every cell of the four tests, each test's timeline and every alternative assumption registered in advance. The benchmark wall is a separate page. It lists figures published by other models, among them DYNASIM, MINT and CBO's, and by SSA and Social Security's Trustees, and it classifies each gap between them and this model. For more than half of its rows, the model does not yet produce a comparable figure. The paper does not draw on the wall. The paper's pass-or-fail verdicts come only from the gates, and the four blind tests report their gaps without grading them.

What the PSID cannot tell us

The PSID's design limits what the model can learn from it:

The model addresses these limits in two ways, and we have begun a third step: a check against Social Security's own earnings records, which has compared the PSID's recorded earnings with them and scored the model's rules for filling gaps in recorded careers, without yet scoring its generated earnings or whole careers; none removes the limits. It is built to carry the PSID's patterns of change onto Microcosm's calibrated CPS frame, which gate w1 tests, though no projection starts there yet. Its gates set tolerances from the PSID's own sampling noise, which cannot reveal a bias the whole PSID shares. And we plan to check the PSID's earnings careers, and those the model generates, against SSA's 2006 Earnings Public-Use File, which holds annual earnings records for 1951 through 2006 for a 1 percent random sample of all Social Security numbers issued before 2007. So far we have compared the PSID's own earnings for 1998 to 2004 with it and, in a separate registered test, scored the rules that fill the years recorded careers leave out on 878,481 people held back from the file: both rules the blind tests use fail, a learned fill for the years before a career passes, and no blind test uses the learned fills yet. We have registered the rules for the part of that check that covers the earnings the model generates, which overlap the file only in the even years from 1998 to 2004. On that span only two cells met the rules for gating, we have not shown that they would catch anything gate 1 does not, and their bite check fell short of its target. The registration therefore does not lock and gates no cell, and we report how the PSID's own earnings compare with the file, without a pass or fail. We have not yet run it on the model's output, and we have not run the comparison of careers.

The first registered test of carrying earnings forward from 2010, B2, failed in October 2026: the share of people aged 25 to 44 with no earnings in 2012 and 2014 came out about 35 percent higher in the model than in the PSID. A successor, designed on evidence other than that result, has to pass before forward earnings join the projections. We plan to add earnings, marriage and divorce after 2010 to the projections, apply the retirement earnings test and the family maximum (the cap on what one worker's family can collect), let claim ages respond to reforms where the data support it, run the full benefit rules in Axiom, and compare the model with public tables from SSA's actuaries, MINT, the Penn Wharton Budget Model and CBO.

Drill

Tap to flip · arrow keys to move

Glossary

Dynamic microsimulation
A model that ages a population of individual people year by year, drawing their earnings, marriages, disabilities, deaths and claims, and applies a program's rules to each life.
PSID
The Panel Study of Income Dynamics: a University of Michigan survey that has followed a set of American families, and the new families their members form, since 1968.
CPS frame
Microcosm's population of 166,302 people in 57,240 households, drawn mainly from the Census Bureau's Current Population Survey and weighted to official totals.
Gate
A test on data set aside from what the model learned from, or on outside data, that we register publicly before we run it, with its pass rule fixed in advance and changed only by public amendment.
Cell and tolerance
A statistic a gate scores, and how far the model may miss it and still pass.
Noise floor
How far apart two halves of the real PSID, with no person in common, land on the same statistic. We set most tolerances from it.
Candidate
A version of a piece of the model that we register for one scored run against its gate. At gates 1 and w1, the candidate that passed was identical to one that had failed under the old terms.
Seed
The starting number for the model's random draws. The same seed always gives the same result, and several gates score each candidate with five seeds.
Amendment
A public change to a gate's terms, which must come before the next scored run.
Report-only
A cell we publish with no tolerance, so it cannot fail a gate.
Holdout test
Gate m6, which the paper calls a temporal holdout: the engine learned only from data through 2014, and we compared its projection with what the PSID recorded for 2015 to 2019. We chose the scored cells, and the structure of the forward earnings model, with those later years in view, and it passed under an amendment adopted after its first candidate failed. Gates 1, 2, 2b and 2c are holdout tests of a different kind: they score a piece of the model on people left out of what it learned from.
Blind test
A comparison with DYNASIM3's published results in which DYNASIM3's values stay sealed until the model's output is saved to the public repository. A test is blind only as far as its registration's disclosed exposures show.
Retirement earnings test
The Social Security rule that withholds benefits from early claimants who keep working. The model holds its parameters but does not yet apply it.
DYNASIM
The Urban Institute's dynamic microsimulation model. The four blind tests use published results from DYNASIM3; DYNASIM4 is the current generation.
MINT
The Social Security Administration's microsimulation model, which runs on Social Security's administrative records matched to the Survey of Income and Program Participation.
AIME
Average indexed monthly earnings: a worker's average monthly earnings over the highest-earning years, adjusted for wage growth. The benefit formula starts from it.
Covered earnings
Earnings from jobs that Social Security covers. The model treats the labor income the PSID records for family heads and spouses as covered earnings.
Axiom
A rules engine that encodes the Social Security statute as machine-readable rules. So far it reproduces one piece of the model's Python benefit rules: AIME computed over the number of years the law sets, for all 7,486 people we tested. It reproduces nothing else yet.