Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
535ff04
Microcosm rename: prose, labels, bib; frozen identifiers keep populace
juaristi22 Aug 14, 2026
2eabe9d
Clarity pass: abstract, gates flow, harness definitions, schematic fi…
juaristi22 Aug 14, 2026
684046a
Humanizer pass over every prose section
juaristi22 Aug 14, 2026
6070ce6
Rebuild manuscript PDF
juaristi22 Aug 14, 2026
f1e4827
Pre-register SCF 2025 replication criteria before any 2025 run
MaxGhenis Oct 10, 2026
18c1fe6
Pin SCF extract files by hash and dollar basis; add --scf-year to swe…
MaxGhenis Oct 10, 2026
4dac883
Score the SCF 2025 replication by the pre-registered rules
MaxGhenis Oct 10, 2026
e205e36
Runs: SCF 2025 replication, 2022 rerun, 2022 in 2025 dollars, and checks
MaxGhenis Oct 10, 2026
46b5210
Report the SCF 2025 replication: comparison document and appendix draft
MaxGhenis Oct 10, 2026
3f723ac
Address review; add the pinball-weighting diagnostic and its caveat o…
MaxGhenis Oct 10, 2026
c37696b
README: list the two diagnostic commands
MaxGhenis Oct 10, 2026
f9bf58d
Rank the OpenML table over the rows it prints
juaristi22 Nov 10, 2026
27f660a
Correct sentences the paper's own tables contradict
juaristi22 Nov 10, 2026
82954f5
Describe the microimpute forest and hot deck as they ran
juaristi22 Nov 10, 2026
8879296
Describe pinball loss and coverage as the code computes them
juaristi22 Nov 10, 2026
e78354a
Pin a commit on main; correct the version and availability statement
juaristi22 Nov 10, 2026
c03b122
Say which gate the experiments use and what they do not test
juaristi22 Nov 10, 2026
d215764
Correct the references
juaristi22 Nov 10, 2026
e286092
Rebuild manuscript PDF
juaristi22 Nov 10, 2026
5e3b3fb
State the CPS weighting effect with its size; align spelling
juaristi22 Nov 13, 2026
f570e72
Rebuild manuscript PDF
juaristi22 Nov 13, 2026
05fb953
Compare the report's full-precision CSVs as tables, not bytes
juaristi22 Nov 13, 2026
1081199
Merge the IJM revision (PolicyEngine/imputation-paper#2) into the SCF…
juaristi22 Nov 13, 2026
db2e28f
Regenerate the 2025 tables under the renamed labels
juaristi22 Nov 13, 2026
60db809
Merge the SCF 2025 replication (PolicyEngine/imputation-paper#6) into…
juaristi22 Nov 13, 2026
106561d
Regenerate the 2025 tables under the fixes' labels; finish the rename…
juaristi22 Nov 13, 2026
096a006
Rebuild manuscript PDF
juaristi22 Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions PLAN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Experiment plan

The paper's claim structure: (1) survey imputation in common practice is
weight-blind in ways that distort population statistics; (2) populace-fit's
weight-blind in ways that distort population statistics; (2) microcosm-fit's
estimator — a regime-gated, sequentially-chained, weighted-bootstrap
quantile-regression forest — addresses this by construction; (3) each of its
three design choices earns its place empirically, against standard methods and
Expand Down Expand Up @@ -46,14 +46,14 @@ truth. Committed surface (9 methods):
| `populace_fit` | candidate | The full estimator (weighted bootstrap + regime gates + chaining) |
| `populace_fit_unweighted` | ablation | `weights="none"`: the weighted-bootstrap contribution |
| `populace_fit_unchained` | ablation | Targets fit independently: the chaining contribution |
| `plain_qrf` | ablation | Single ungated, unchained forest (microimpute QRF): the gating contribution |
| `microimpute_qrf` | baseline | Standard QRF imputation |
| `plain_qrf` | baseline | Same estimator as `microimpute_qrf`, under the key the committed runs also carry. First planned as the gates-off, chaining-off ablation; it is not one, because microimpute's QRF chains its targets and draws through its own sampler |
| `microimpute_qrf` | baseline | Standard QRF imputation (microimpute, as shipped) |
| `microimpute_ols` | baseline | OLS with normal residual draws |
| `microimpute_quantreg` | baseline | Linear quantile regression (per-quantile fits) |
| `statmatch_hotdeck` | baseline | Classical nearest-neighbour-distance hot deck (py-statmatch) |
| `weighted_marginal` | harness | Dependency-free lower bound; CI only |

Released microimpute (1.1.2) carries no Matching model (it exists only behind
Released microimpute (1.15.1; its `__version__` string reads 1.1.2) carries no Matching model (it exists only behind
an R dependency in the dev tree), so py-statmatch's NND hot deck is *the*
matching baseline. Adding or removing a method is a deliberate change to this
table, not drift.
Expand All @@ -71,7 +71,7 @@ table, not drift.
wealth, jointly). `scf_sample_reference` — the donor split scored as a
candidate — anchors the sampling-noise floor. Two profiles: **minimal**
(6 shared predictors, 2 targets, ASEC 2025 receiver — the controlled
instantiation) and **populace-scale** (10 shared predictors incl. edcl/
instantiation) and **production-scale** (10 shared predictors incl. edcl/
race/housecl/lf, pooled ASEC 2023–2025 receiver mirroring the production
spine, 4 chain-ordered targets with the exact balance-sheet identity
networth = fin + nfin − debt). The scale profile tests whether the joint
Expand All @@ -93,7 +93,7 @@ table, not drift.
weights: transfer beyond economic microdata.

Full multi-view synthesis (CPS+SIPP+PSID candidates scored on all views at
once) is the populace release-gate use case and future work; PSID requires
once) is the microcosm release-gate use case and future work; PSID requires
registered access and is out of scope here.

## Protocol
Expand Down Expand Up @@ -138,7 +138,7 @@ weighted classifier two-sample AUC, and closed-form reweight fragility
- Adapters, metrics, views, task registry, `imp sweep`/`imp harness`:
implemented with tests.
- Remaining: data loaders finalize → full runs → results/discussion prose →
PyPI publication of populace-frame/populace-fit + standalone quickstart.
PyPI publication of microcosm-frame/microcosm-fit + standalone quickstart.

## Relationship to prior work in this org

Expand Down
71 changes: 65 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# imputation-paper

Paper and experiment workspace for populace's weight-aware imputation
Paper and experiment workspace for Microcosm's weight-aware imputation
approach: the regime-gated, sequentially-chained, weighted-bootstrap
quantile-regression forest in
[`populace-fit`](https://github.com/PolicyEngine/populace/tree/main/packages/populace-fit),
[`microcosm-fit`](https://github.com/PolicyEngine/microcosm/tree/main/packages/microcosm-fit),
benchmarked against standard survey-imputation methods (plain QRF, OLS,
quantile regression, hot-deck statistical matching) with ablations attributing
the gains to each design choice.
the gains to weighting and chaining. (Microcosm was first released under the name
Populace; the reported sweeps pin a pre-rename commit, so the experiment code
and its pinned dependencies keep the legacy `populace` spellings.)

Sibling of [l0-paper](https://github.com/PolicyEngine/l0-paper) (which covers
record selection and weighting; this paper covers filling records in) and the
Expand All @@ -23,12 +25,69 @@ uv run imp figures runs/toy-sweep # aggregates to summary.csv / summary.tex
quarto render paper/index.qmd # builds the manuscript
```

### SCF 2025 replication

The paper's SCF experiments run on the 2022 wave. The 2025 wave (released
2026-10-09) is a replication on data no method was tuned on; the rules were
committed first, in `docs/scf-2025-replication-criteria.md`.

```bash
uv sync --extra methods
export OMP_NUM_THREADS=1 # one OpenMP thread per run; see note below
uv run imp sweep --task scf_wealth --scf-year 2025 --out runs/scf-wealth-2025
uv run imp harness --profile minimal --scf-year 2025 # runs/scf-to-cps-harness-2025
uv run imp harness --profile populace-scale --scf-year 2025 # runs/scf-to-cps-harness-scale-2025
uv run imp scf-checks # weights, balance-sheet identity, Fed Table 2, both waves
uv run imp hotdeck-reuse # aggregate donor reuse behind hot deck's 2025 tail
uv run imp pinball-weighting # pinball loss as coded vs with weighted imputed quantiles
uv run imp replication # docs/scf-2025-replication/comparison.md + appendix inputs
uv run imp tables # also writes the *_2025.tex tables
```

Diagnostic arms: `--scf-year 2022` into `*-2022-rerun` (does today's
environment reproduce the committed runs?) and `--scf-year 2022
--scf-dollar-year 2025` into `*-2022-in-2025-dollars` (the change of dollar
basis alone). The Fed replaced `scfp2022s.zip` on 2026-10-09 with a copy in
2025 dollars; the loader identifies each extract by SHA-256 and returns the
survey year's dollars by default, so the paper's 2022 inputs are unchanged
whichever copy is cached. With the default OpenMP thread count (one per
core), several runs side by side oversubscribe the CPU; on a loaded machine
cells ran many times slower. With one thread per run the 2022
rerun reproduces the committed runs (see the comparison document's
diagnostics).

The real method surface installs with the `methods` extra
(`uv sync --extra methods`), which pulls populace-fit/populace-frame (git),
microimpute (PyPI), and py-statmatch (git). CI deliberately runs without it:
(`uv sync --extra methods`), which pulls populace-fit/populace-frame (git,
pinned to a pre-rename commit of the microcosm repo), microimpute (PyPI), and
py-statmatch (git). CI deliberately runs without it:
the registry imports methods lazily, and sweeps record unavailable methods in
`skipped.csv` rather than failing or silently dropping them.

## Installing the estimator on its own

The estimator is one package in the
[Microcosm repository](https://github.com/PolicyEngine/microcosm) and installs
without the rest of the stack. It is not on PyPI, and the PyPI project named
`microcosm` is unrelated software, so install it as a Git dependency. With uv
one requirement is enough: uv resolves the sibling packages it needs from the
same commit.

The version the paper's runs used, when the package was named `populace-fit`:

```bash
uv pip install "populace-fit @ git+https://github.com/PolicyEngine/microcosm.git@b538d8a4ecac9f0bad33c4f8d27acc453e280624#subdirectory=packages/populace-fit"
```

The current package, `microcosm-fit`, at a commit of your choice:

```bash
uv pip install "microcosm-fit @ git+https://github.com/PolicyEngine/microcosm.git@<commit>#subdirectory=packages/microcosm-fit"
```

pip does not read uv's workspace sources, so with pip pass one such URL for
each package: `populace-fit` and `populace-frame` at the pinned commit, or
`microcosm-fit`, `microcosm-frame` and `microcosm-graph` at a current one.

## Layout

- `PLAN.md` — the experiment plan: tasks × methods × ablations × metrics, the
Expand All @@ -45,7 +104,7 @@ the registry imports methods lazily, and sweeps record unavailable methods in

## Boundary

- populace packages must not import from this repository.
- microcosm packages must not import from this repository.
- Sweeps take explicit, pinned inputs; they do not discover artifacts from
working directories.
- Every number in the manuscript regenerates from a committed run config;
Expand Down
Loading
Loading