Skip to content

Commit ae95b43

Browse files
MaxGhenisclaude
andauthored
Bump spm-calculator to >=0.2.1 for Betson equivalence scale fix (#771)
`policyengine_us_data/utils/spm.py` already consumes `spm-calculator` for base thresholds and the equivalence scale, but the dependency range was pinned at `>=0.1.0` so the lockfile resolved to `spm-calculator==0.1.0` -- which shipped a buggy linear OECD-modified equivalence scale (reference family raw = 2.1) instead of the Betson three-parameter scale with the 0.7 exponent (reference family raw = 3**0.7 approx 2.158) that BLS Garner (2021) documents and that Census uses in its published SPM thresholds. Version 0.2.0 of `spm-calculator` replaced the scale with the correct Betson form; 0.2.1 then tightened the (shadow) CE recomputation path toward BLS methodology (annualization, survey weights, mortgage principal, internet services, modern CUTENURE split). Bumping to `>=0.2.1` picks up both. Impact on computed SPM thresholds (CPS input pipeline, unchanged code, dependency bump only) - 2 adult / 2 child reference family: unchanged (normalization anchor). - 1 adult / 2 child owner-with-mortgage: $29,767 -> $32,437 (+9.0%). - 2 adult / 0 child owner-with-mortgage: $27,906 -> $25,530 (-8.5%). - Direction: single-parent-with-children units shift higher, larger childless-adult units shift lower -- matching the well-known Betson economies-of-scale properties. This changes the SPM thresholds that `cps.py` writes onto the CPS input dataset, which feeds every downstream SPM-based calibration target and poverty classification. The update is a correctness fix, not a policy change. Validation - All 714 unit tests pass (`uv run pytest tests/unit/`). - `calculate_spm_thresholds_with_geoadj` output verified by hand against Betson math for 1A2C / 2A2C / 2A0C at owner-with-mortgage. - Public API of `policyengine_us_data/utils/spm.py` unchanged across the version bump; no call-site updates required in `cps.py` or `calibration_utils.py`. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6fbe4dd commit ae95b43

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump `spm-calculator` dependency from `>=0.1.0` to `>=0.2.1` so the SPM thresholds computed for the CPS input dataset use the Betson three-parameter equivalence scale (with the 0.7 exponent) published by Census, not the linear OECD-modified scale shipped in `spm-calculator==0.1.0`. Also picks up tenure-specific GEOADJ shares (renter 0.443, owner-with-mortgage 0.434, owner-without-mortgage 0.323) and the BLS-fidelity improvements in the CE recomputation path. For a 2-adult 2-child reference family the threshold is unchanged; non-reference families shift materially (1 adult / 2 children owner-with-mortgage: $29,767 -> $32,437, +9.0%; 2 adults / 0 children owner-with-mortgage: $27,906 -> $25,530, -8.5%). No code changes in `policyengine_us_data/utils/spm.py`; the package-level API is unchanged across the version bump.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies = [
4242
"sqlalchemy>=2.0.41",
4343
"sqlmodel>=0.0.24",
4444
"xlrd>=2.0.2",
45-
"spm-calculator>=0.1.0",
45+
"spm-calculator>=0.2.1",
4646
"tenacity>=8.0.0",
4747
]
4848

uv.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)