Commit 674f566
Derive partnership_se_income from PUF source columns (#485)
* Derive partnership_se_income from PUF instead of looking for missing columns
The raw IRS PUF doesn't contain k1bx14p/k1bx14s columns - these are derived
by PSLmodels/taxdata from the total SE income (E30400/E30500) minus Schedule C
(E00900) and Schedule F (E02100) income.
This fix implements the same derivation logic from taxdata's finalprep.py
split_earnings_variables function. The formula is:
partnership_se = (E30400 + E30500) - E00900 - E02100
This ensures partnership_se_income has non-zero values in the PUF-based
datasets, enabling accurate SE tax calculations for general partners.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Use Yale Budget Lab's gross-up approach for partnership_se_income
The E30400/E30500 PUF columns are already TAXABLE SE income (post-0.9235
deduction factor). Since PolicyEngine applies the 0.9235 factor itself in
taxable_self_employment_income, we need to provide GROSS partnership SE income.
Changes:
- Gross up E30400+E30500 by dividing by 0.9235 before subtracting Sch C/F
- Only compute when partnership activity exists (E25940+E25980-E25920-E25960 != 0)
This aligns with Yale Budget Lab's Tax-Data approach in process_puf.R:
part_se = if_else(E25940 + E25980 - E25920 - E25960 != 0,
(E30400 + E30500) / 0.9235 - E00900 - E02100, 0)
Weighted sum increases from $12.7B to $55.7B, which is more realistic given
total SE income of ~$400B.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add changelog entry
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent c1d5cd0 commit 674f566
2 files changed
Lines changed: 29 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
391 | 411 | | |
392 | 412 | | |
393 | 413 | | |
| |||
0 commit comments