|
44 | 44 |
|
45 | 45 | BEA_NIPA_WAGES_AND_SALARIES_2024 = 12_387_929_000_000 |
46 | 46 | BEA_NIPA_PROPRIETORS_INCOME_2024 = 2_023_080_000_000 |
47 | | -BEA_NIPA_PERSONAL_INTEREST_INCOME_2024 = 1_926_644_000_000 |
48 | | -BEA_NIPA_PERSONAL_DIVIDEND_INCOME_2024 = 2_218_700_000_000 |
49 | 47 |
|
50 | | -NIPA_PROPRIETORS_INCOME_VARIABLE = "nipa_proprietors_income" |
51 | | -NIPA_PERSONAL_INTEREST_INCOME_VARIABLE = "interest_income" |
| 48 | +NIPA_PROPRIETORS_INCOME_VARIABLE = ( |
| 49 | + "self_employment_income_before_lsr" |
| 50 | + "+sstb_self_employment_income_before_lsr" |
| 51 | + "+farm_operations_income" |
| 52 | + "+partnership_s_corp_income" |
| 53 | +) |
| 54 | +# CBO's individual income tax model computes AGI with "taxable interest |
| 55 | +# and ordinary dividends" explicitly excluding qualified dividends, which |
| 56 | +# are reported on the next line. Keep this mapped to the tax-return concept |
| 57 | +# for filer tax units, not total interest plus all dividends. |
52 | 58 | TAXABLE_INTEREST_AND_ORDINARY_DIVIDENDS_VARIABLE = ( |
53 | | - "taxable_interest_income+dividend_income" |
| 59 | + "taxable_interest_income+non_qualified_dividend_income" |
54 | 60 | ) |
55 | 61 |
|
| 62 | +# Only use direct NIPA totals when the PolicyEngine variable expression is a |
| 63 | +# close microdata concept. BEA personal interest/dividends include imputed |
| 64 | +# interest, pension-plan dividends, and trust flows, so those macro totals |
| 65 | +# should not directly calibrate tax/CPS interest and dividend variables. |
56 | 66 | BEA_NIPA_DIRECT_SUM_TARGETS = ( |
57 | 67 | ( |
58 | 68 | "nation/bea/nipa_wages_and_salaries", |
|
64 | 74 | NIPA_PROPRIETORS_INCOME_VARIABLE, |
65 | 75 | BEA_NIPA_PROPRIETORS_INCOME_2024, |
66 | 76 | ), |
67 | | - ( |
68 | | - "nation/bea/nipa_personal_interest_income", |
69 | | - NIPA_PERSONAL_INTEREST_INCOME_VARIABLE, |
70 | | - BEA_NIPA_PERSONAL_INTEREST_INCOME_2024, |
71 | | - ), |
72 | | - ( |
73 | | - "nation/bea/nipa_personal_dividend_income", |
74 | | - "dividend_income", |
75 | | - BEA_NIPA_PERSONAL_DIVIDEND_INCOME_2024, |
76 | | - ), |
77 | 77 | ) |
78 | 78 |
|
79 | | -BEA_WAGES_AND_SALARIES_LOSS_WEIGHT = 5_000.0 |
| 79 | +BEA_NIPA_DIRECT_SUM_LOSS_WEIGHT = 1_000.0 |
| 80 | +BEA_WAGES_AND_SALARIES_LOSS_WEIGHT = 1_000.0 |
80 | 81 |
|
81 | 82 | CBO_INCOME_BY_SOURCE_TARGETS = [ |
82 | 83 | ("irs_employment_income", "employment_income"), |
@@ -1145,9 +1146,15 @@ def get_target_error_normalisation(target_names, targets_array): |
1145 | 1146 | def get_target_loss_weights(target_names): |
1146 | 1147 | target_names = np.asarray(target_names, dtype=str) |
1147 | 1148 | weights = np.ones(target_names.shape, dtype=np.float32) |
| 1149 | + bea_direct_sum_targets = np.array( |
| 1150 | + [label for label, _, _ in BEA_NIPA_DIRECT_SUM_TARGETS], |
| 1151 | + dtype=str, |
| 1152 | + ) |
| 1153 | + is_bea_direct_sum_target = np.isin(target_names, bea_direct_sum_targets) |
1148 | 1154 | is_bea_wage_target = ( |
1149 | 1155 | target_names == "nation/bea/nipa_wages_and_salaries" |
1150 | 1156 | ) | np.char.startswith(target_names, "state/bea/wages_and_salaries/") |
| 1157 | + weights[is_bea_direct_sum_target] = BEA_NIPA_DIRECT_SUM_LOSS_WEIGHT |
1151 | 1158 | weights[is_bea_wage_target] = BEA_WAGES_AND_SALARIES_LOSS_WEIGHT |
1152 | 1159 | return weights |
1153 | 1160 |
|
|
0 commit comments