policyengine-us 1.426.0__py3-none-any.whl → 1.439.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. policyengine_us/parameters/gov/aca/state_rating_area_cost.yaml +511 -12
  2. policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/adult_dependent_credit/min_age.yaml +1 -1
  3. policyengine_us/parameters/gov/contrib/states/ri/ctc/young_child_boost/age_limit.yaml +9 -0
  4. policyengine_us/parameters/gov/contrib/states/ri/ctc/young_child_boost/amount.yaml +9 -0
  5. policyengine_us/parameters/gov/contrib/states/ri/dependent_exemption/amount.yaml +2 -2
  6. policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/senior_or_disabled/income/limit/couple.yaml +60 -51
  7. policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/senior_or_disabled/income/limit/individual.yaml +60 -51
  8. policyengine_us/parameters/gov/hhs/tanf/cash/income/sources/earned.yaml +13 -0
  9. policyengine_us/parameters/gov/hhs/tanf/cash/income/sources/unearned.yaml +23 -0
  10. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/README.md +1 -206
  11. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/{income/all.yaml → income.yaml} +1 -1
  12. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/substitution.yaml +70 -0
  13. policyengine_us/parameters/gov/states/co/tax/income/credits/care_worker/amount/joint.yaml +10 -0
  14. policyengine_us/parameters/gov/states/co/tax/income/credits/care_worker/amount/single.yaml +10 -0
  15. policyengine_us/parameters/gov/states/co/tax/income/credits/care_worker/income_limit/joint.yaml +10 -0
  16. policyengine_us/parameters/gov/states/co/tax/income/credits/care_worker/income_limit/single.yaml +10 -0
  17. policyengine_us/parameters/gov/states/co/tax/income/credits/refundable.yaml +10 -0
  18. policyengine_us/parameters/gov/states/ga/tax/income/credits/itemizer/amount.yaml +14 -0
  19. policyengine_us/parameters/gov/states/ga/tax/income/credits/non_refundable.yaml +9 -0
  20. policyengine_us/parameters/gov/states/hi/tax/income/alternative_tax/availability.yaml +2 -3
  21. policyengine_us/parameters/gov/states/pa/tax/income/credits/eitc/match.yaml +10 -0
  22. policyengine_us/parameters/gov/states/pa/tax/income/credits/refundable.yaml +6 -0
  23. policyengine_us/parameters/gov/states/va/tax/income/credits/non_refundable.yaml +1 -1
  24. policyengine_us/parameters/gov/territories/pr/tax/income/credits/refundable.yaml +2 -0
  25. policyengine_us/parameters/gov/territories/pr/tax/income/tax_rate/amount.yaml +35 -0
  26. policyengine_us/parameters/gov/usda/snap/work_requirements/general/age_threshold/caring_dependent_child.yaml +1 -1
  27. policyengine_us/parameters/gov/usda/snap/work_requirements/general/age_threshold/exempted.yaml +1 -1
  28. policyengine_us/parameters/gov/usda/snap/work_requirements/general/weekly_hours_threshold.yaml +1 -1
  29. policyengine_us/reforms/congress/tlaib/__init__.py +4 -3
  30. policyengine_us/reforms/congress/tlaib/economic_dignity_for_all_agenda/__init__.py +9 -0
  31. policyengine_us/reforms/congress/tlaib/economic_dignity_for_all_agenda/edaa_end_child_poverty_act.py +237 -0
  32. policyengine_us/reforms/reforms.py +5 -4
  33. policyengine_us/reforms/states/ri/ctc/ri_ctc_reform.py +32 -1
  34. policyengine_us/reforms/states/ri/exemption/ri_exemption_reform.py +26 -5
  35. policyengine_us/tests/policy/baseline/gov/ed/pell_grant/pell_grant_simplified_formula_applies.yaml +1 -1
  36. policyengine_us/tests/policy/baseline/gov/hhs/tanf/tanf_fpg.yaml +53 -0
  37. policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/income_elasticity.yaml +6 -12
  38. policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/labor_supply_behavioral_response.yaml +24 -2
  39. policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/substitution_elasticity.yaml +35 -10
  40. policyengine_us/tests/policy/baseline/gov/ssa/ssi/integration_tests.yaml +150 -4
  41. policyengine_us/tests/policy/baseline/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit.yaml +64 -0
  42. policyengine_us/tests/policy/baseline/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit_eligible.yaml +122 -0
  43. policyengine_us/tests/policy/baseline/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit_eligible_care_worker_count.yaml +65 -0
  44. policyengine_us/tests/policy/baseline/gov/states/ga/tax/income/credits/ga_itemizer_credit.yaml +44 -0
  45. policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/alternative_tax/hi_alternative_tax_on_capital_gains_eligible.yaml +0 -8
  46. policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/cdcc/hi_cdcc.yaml +4 -0
  47. policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/cdcc/hi_cdcc_eligible.yaml +15 -0
  48. policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/integration.yaml +96 -0
  49. policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.yaml +8 -8
  50. policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/integation.yaml +57 -0
  51. policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/oh_cdcc.yaml +4 -4
  52. policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/integration.yaml +59 -0
  53. policyengine_us/tests/policy/baseline/gov/states/pa/tax/income/credits/pa_eitc.yaml +26 -0
  54. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/pr_normal_tax.yaml +31 -0
  55. policyengine_us/tests/policy/baseline/gov/test_categorical_eligibility_vectorization.yaml +41 -0
  56. policyengine_us/tests/policy/contrib/congress/tlaib/economic_dignity_for_all_agenda/edaa_end_child_poverty_act.yaml +198 -0
  57. policyengine_us/tests/policy/contrib/states/ri/ctc_reform_test.yaml +144 -0
  58. policyengine_us/tests/policy/contrib/states/ri/exemption_reform_test.yaml +2 -2
  59. policyengine_us/variables/gov/ed/pell_grant/efc/pell_grant_simplified_formula_applies.py +1 -2
  60. policyengine_us/variables/gov/fcc/lifeline/is_lifeline_eligible.py +2 -2
  61. policyengine_us/variables/gov/hhs/head_start/early_head_start.py +2 -1
  62. policyengine_us/variables/gov/hhs/head_start/head_start.py +2 -1
  63. policyengine_us/variables/gov/hhs/head_start/is_head_start_categorically_eligible.py +1 -3
  64. policyengine_us/variables/gov/hhs/tanf/cash/income/tanf_gross_earned_income.py +13 -0
  65. policyengine_us/variables/gov/hhs/tanf/cash/income/tanf_gross_unearned_income.py +13 -0
  66. policyengine_us/variables/gov/hhs/tanf/tanf_fpg.py +28 -0
  67. policyengine_us/variables/gov/simulation/labor_supply_response/income_elasticity.py +1 -27
  68. policyengine_us/variables/gov/simulation/labor_supply_response/substitution_elasticity.py +18 -43
  69. policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_spouse/is_ssi_spousal_deeming_applies.py +41 -0
  70. policyengine_us/variables/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_spouse/ssi_income_deemed_from_ineligible_spouse.py +20 -20
  71. policyengine_us/variables/gov/ssa/ssi/ssi.py +22 -1
  72. policyengine_us/variables/gov/ssa/ssi/ssi_amount_if_eligible.py +26 -4
  73. policyengine_us/variables/gov/states/ca/cpuc/care/eligibility/ca_care_categorically_eligible.py +2 -2
  74. policyengine_us/variables/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit.py +26 -0
  75. policyengine_us/variables/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit_eligible.py +27 -0
  76. policyengine_us/variables/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit_eligible_care_worker.py +10 -0
  77. policyengine_us/variables/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit_eligible_care_worker_count.py +18 -0
  78. policyengine_us/variables/gov/states/ga/tax/income/credits/ga_itemizer_credit.py +19 -0
  79. policyengine_us/variables/gov/states/hi/tax/income/credits/cdcc/hi_cdcc.py +1 -1
  80. policyengine_us/variables/gov/states/hi/tax/income/credits/cdcc/hi_cdcc_eligible.py +14 -0
  81. policyengine_us/variables/gov/states/nj/tax/income/credits/cdcc/nj_cdcc.py +2 -2
  82. policyengine_us/variables/gov/states/oh/tax/income/credits/oh_cdcc.py +2 -2
  83. policyengine_us/variables/gov/states/pa/tax/income/credits/pa_eitc.py +16 -0
  84. policyengine_us/variables/gov/territories/pr/tax/income/pr_income_tax.py +14 -0
  85. policyengine_us/variables/gov/territories/pr/tax/income/pr_normal_tax.py +16 -0
  86. policyengine_us/variables/gov/territories/pr/tax/income/pr_regular_tax_before_credits.py +11 -0
  87. policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/pr_net_taxable_income.py +11 -0
  88. {policyengine_us-1.426.0.dist-info → policyengine_us-1.439.0.dist-info}/METADATA +1 -1
  89. {policyengine_us-1.426.0.dist-info → policyengine_us-1.439.0.dist-info}/RECORD +100 -84
  90. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/baby_bonus_act/age_limit.yaml +0 -8
  91. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/baby_bonus_act/amount.yaml +0 -13
  92. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/baby_bonus_act/in_effect.yaml +0 -8
  93. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/baby_bonus_act/min_birth_year.yaml +0 -8
  94. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/boost_act/amount.yaml +0 -13
  95. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/boost_act/in_effect.yaml +0 -8
  96. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/boost_act/max_age.yaml +0 -8
  97. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/boost_act/min_age.yaml +0 -8
  98. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/boost_act/tax/rate.yaml +0 -8
  99. policyengine_us/parameters/gov/contrib/congress/tlaib/income_security_package/boost_act/tax/threshold.yaml +0 -24
  100. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/income/age_multiplier_over_threshold.yaml +0 -11
  101. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/income/age_threshold.yaml +0 -9
  102. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/income/base.yaml +0 -11
  103. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/substitution/age_multiplier_over_threshold.yaml +0 -11
  104. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/substitution/age_threshold.yaml +0 -9
  105. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/substitution/all.yaml +0 -6
  106. policyengine_us/parameters/gov/simulation/labor_supply_responses/elasticities/substitution/by_position_and_decile.yaml +0 -71
  107. policyengine_us/reforms/congress/tlaib/income_security_package/__init__.py +0 -17
  108. policyengine_us/reforms/congress/tlaib/income_security_package/income_security_package.py +0 -402
  109. policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/integration.yaml +0 -45
  110. policyengine_us/tests/policy/contrib/congress/tlaib/income_security/integration.yaml +0 -154
  111. policyengine_us/tests/policy/contrib/congress/tlaib/income_security/state_integration.yaml +0 -110
  112. policyengine_us/tests/policy/contrib/congress/tlaib/income_security/test_individual_acts.yaml +0 -149
  113. policyengine_us/tests/policy/contrib/congress/tlaib/income_security/unit_tests.yaml +0 -272
  114. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/adult_dependent_credit/amount.yaml +0 -0
  115. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/child_benefit/age_limit.yaml +0 -0
  116. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/filer_credit/amount.yaml +0 -0
  117. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/filer_credit/eligibility/max_age.yaml +0 -0
  118. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/filer_credit/eligibility/min_age.yaml +0 -0
  119. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/filer_credit/phase_out/rate.yaml +0 -0
  120. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/filer_credit/phase_out/start.yaml +0 -0
  121. /policyengine_us/parameters/gov/contrib/congress/tlaib/{income_security_package → economic_dignity_for_all_agenda}/end_child_poverty_act/in_effect.yaml +0 -0
  122. {policyengine_us-1.426.0.dist-info → policyengine_us-1.439.0.dist-info}/WHEEL +0 -0
  123. {policyengine_us-1.426.0.dist-info → policyengine_us-1.439.0.dist-info}/entry_points.txt +0 -0
  124. {policyengine_us-1.426.0.dist-info → policyengine_us-1.439.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,198 @@
1
+ # End Child Poverty Act tests
2
+
3
+ - name: ECPA child benefit for eligible child
4
+ period: 2026
5
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
6
+ input:
7
+ people:
8
+ parent:
9
+ age: 30
10
+ child:
11
+ age: 5
12
+ tax_units:
13
+ tax_unit:
14
+ members: [parent, child]
15
+ filing_status: SINGLE
16
+ adjusted_gross_income: 20_000
17
+ households:
18
+ household:
19
+ members: [parent, child]
20
+ output:
21
+ ecpa_child_benefit: [0, 5_630]
22
+ ecpa_filer_credit: 700
23
+
24
+ - name: ECPA adult dependent credit
25
+ period: 2026
26
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
27
+ input:
28
+ people:
29
+ parent:
30
+ age: 45
31
+ adult_dependent:
32
+ age: 20
33
+ is_tax_unit_dependent: true
34
+ tax_units:
35
+ tax_unit:
36
+ members: [parent, adult_dependent]
37
+ filing_status: SINGLE
38
+ adjusted_gross_income: 15_000
39
+ output:
40
+ ecpa_adult_dependent_credit: [0, 700]
41
+ ecpa_filer_credit: 700
42
+
43
+ - name: ECPA filer credit with phase out
44
+ period: 2026
45
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
46
+ input:
47
+ people:
48
+ filer:
49
+ age: 40
50
+ tax_units:
51
+ tax_unit:
52
+ members: [filer]
53
+ filing_status: SINGLE
54
+ adjusted_gross_income: 24_000
55
+ output:
56
+ ecpa_filer_credit: 500 # 700 - (4,000 * 0.05)
57
+
58
+ - name: ECPA household with children and adult dependent
59
+ period: 2026
60
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
61
+ input:
62
+ people:
63
+ parent:
64
+ age: 45
65
+ child1:
66
+ age: 5
67
+ child2:
68
+ age: 10
69
+ adult_dependent:
70
+ age: 20
71
+ is_tax_unit_dependent: true
72
+ tax_units:
73
+ tax_unit:
74
+ members: [parent, child1, child2, adult_dependent]
75
+ filing_status: SINGLE
76
+ adjusted_gross_income: 30_000
77
+ output:
78
+ ecpa_child_benefit: [0, 5_630, 5_630, 0]
79
+ ecpa_adult_dependent_credit: [0, 0, 0, 700]
80
+ ecpa_filer_credit: 200 # 700 - (10,000 * 0.05)
81
+
82
+ - name: ECPA joint filers with children and adult dependent
83
+ period: 2026
84
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
85
+ input:
86
+ people:
87
+ parent1:
88
+ age: 40
89
+ parent2:
90
+ age: 38
91
+ child:
92
+ age: 8
93
+ adult_dependent:
94
+ age: 22
95
+ is_tax_unit_dependent: true
96
+ tax_units:
97
+ tax_unit:
98
+ members: [parent1, parent2, child, adult_dependent]
99
+ filing_status: JOINT
100
+ adjusted_gross_income: 45_000
101
+ output:
102
+ ecpa_child_benefit: [0, 0, 5_630, 0]
103
+ ecpa_adult_dependent_credit: [0, 0, 0, 700]
104
+ ecpa_filer_credit: 1_150 # 1,400 - (5,000 * 0.05)
105
+
106
+ - name: Oklahoma family - state credits reference federal calculations
107
+ period: 2026
108
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
109
+ absolute_error_margin: 1
110
+ input:
111
+ people:
112
+ parent1:
113
+ age: 35
114
+ employment_income: 30_000
115
+ parent2:
116
+ age: 33
117
+ employment_income: 20_000
118
+ newborn:
119
+ age: 0
120
+ birth_year: 2026
121
+ child:
122
+ age: 8
123
+ birth_year: 2018
124
+ adult_dependent:
125
+ age: 19
126
+ birth_year: 2007
127
+ is_full_time_student: true
128
+ tax_units:
129
+ tax_unit:
130
+ members: [parent1, parent2, newborn, child, adult_dependent]
131
+ filing_status: JOINT
132
+ households:
133
+ household:
134
+ members: [parent1, parent2, newborn, child, adult_dependent]
135
+ state_code: OK
136
+ output:
137
+ # Federal CTC/EITC calculated for state reference
138
+ ctc: 4_900
139
+ eitc: 4_244
140
+
141
+ # Oklahoma credits (5% of federal)
142
+ ok_child_care_child_tax_credit:
143
+ 2026: 245 # 5% of $4,900
144
+ ok_eitc:
145
+ 2026: 72.07
146
+
147
+ # ECPA benefits
148
+ ecpa_child_benefit:
149
+ 2026: [0, 0, 5_630, 5_630, 0]
150
+ ecpa_adult_dependent_credit:
151
+ 2026: [0, 0, 0, 0, 700]
152
+ ecpa_filer_credit:
153
+ 2026: 900 # $1,400 - ($50k - $40k) * 0.05
154
+
155
+ # Federal refundable credits exclude CTC/EITC
156
+ income_tax_refundable_credits:
157
+ 2026: 1_600 # ECPA filer ($900) + adult dependent ($700)
158
+
159
+ - name: Maine single parent - state EITC percentage of federal
160
+ period: 2026
161
+ reforms: policyengine_us.reforms.congress.tlaib.economic_dignity_for_all_agenda.end_child_poverty_act
162
+ absolute_error_margin: 1
163
+ input:
164
+ people:
165
+ parent:
166
+ age: 28
167
+ employment_income: 25_000
168
+ child1:
169
+ age: 3
170
+ birth_year: 2023
171
+ child2:
172
+ age: 10
173
+ birth_year: 2016
174
+ tax_units:
175
+ tax_unit:
176
+ members: [parent, child1, child2]
177
+ filing_status: HEAD_OF_HOUSEHOLD
178
+ households:
179
+ household:
180
+ members: [parent, child1, child2]
181
+ state_code: ME
182
+ output:
183
+ # Federal calculations
184
+ ctc: 4_400
185
+ eitc: 7_071
186
+
187
+ # Maine EITC is 25% of federal
188
+ me_eitc: 1_767
189
+
190
+ # ECPA benefits
191
+ ecpa_child_benefit:
192
+ 2026: [0, 5_630, 5_630]
193
+ ecpa_filer_credit:
194
+ 2026: 450 # $700 - ($25k - $20k) * 0.05
195
+
196
+ # Federal credits exclude EITC/CTC
197
+ income_tax_refundable_credits:
198
+ 2026: 450
@@ -175,3 +175,147 @@
175
175
  ri_non_refundable_ctc: 0
176
176
  ri_refundable_credits: 1_583.28 # 1_000 (CTC refundable) + 583.28 (EITC)
177
177
  ri_non_refundable_credits: 0
178
+
179
+ - name: RI CTC - young child boost applies to children under age 6
180
+ absolute_error_margin: 0.1
181
+ period: 2025
182
+ reforms: policyengine_us.reforms.states.ri.ctc.ri_ctc_reform.ri_ctc
183
+ input:
184
+ gov.contrib.states.ri.ctc.in_effect: true
185
+ gov.contrib.states.ri.ctc.amount: 1_000
186
+ gov.contrib.states.ri.ctc.age_limit: 18
187
+ gov.contrib.states.ri.ctc.young_child_boost.amount: 500
188
+ gov.contrib.states.ri.ctc.young_child_boost.age_limit: 6
189
+ gov.contrib.states.ri.ctc.refundability.cap: 999_999
190
+ gov.contrib.states.ri.ctc.phaseout.threshold.SINGLE: 100_000
191
+ gov.contrib.states.ri.ctc.phaseout.rate: 0.05
192
+ people:
193
+ parent:
194
+ age: 35
195
+ employment_income: 50_000
196
+ child1:
197
+ age: 3
198
+ is_tax_unit_dependent: true
199
+ child2:
200
+ age: 10
201
+ is_tax_unit_dependent: true
202
+ tax_units:
203
+ tax_unit:
204
+ members: [parent, child1, child2]
205
+ filing_status: SINGLE
206
+ households:
207
+ household:
208
+ members: [parent, child1, child2]
209
+ state_name: RI
210
+ output:
211
+ ri_ctc_eligible_children: 2
212
+ ri_ctc_young_child_boost: 500 # 1 child under 6 × $500 = $500
213
+ ri_ctc_maximum: 2_500 # Base: 2 × $1_000 = $2_000; Boost: $500; Total = $2_500
214
+ ri_total_ctc: 2_500
215
+ ri_refundable_ctc: 2_500
216
+ ri_non_refundable_ctc: 0
217
+
218
+ - name: RI CTC - young child boost boundary at age 6
219
+ absolute_error_margin: 0.1
220
+ period: 2025
221
+ reforms: policyengine_us.reforms.states.ri.ctc.ri_ctc_reform.ri_ctc
222
+ input:
223
+ gov.contrib.states.ri.ctc.in_effect: true
224
+ gov.contrib.states.ri.ctc.amount: 1_000
225
+ gov.contrib.states.ri.ctc.age_limit: 18
226
+ gov.contrib.states.ri.ctc.young_child_boost.amount: 500
227
+ gov.contrib.states.ri.ctc.young_child_boost.age_limit: 6
228
+ gov.contrib.states.ri.ctc.refundability.cap: 999_999
229
+ people:
230
+ parent:
231
+ age: 35
232
+ employment_income: 40_000
233
+ child1:
234
+ age: 5
235
+ is_tax_unit_dependent: true
236
+ child2:
237
+ age: 6
238
+ is_tax_unit_dependent: true
239
+ tax_units:
240
+ tax_unit:
241
+ members: [parent, child1, child2]
242
+ filing_status: SINGLE
243
+ households:
244
+ household:
245
+ members: [parent, child1, child2]
246
+ state_name: RI
247
+ output:
248
+ ri_ctc_eligible_children: 2
249
+ ri_ctc_young_child_boost: 500 # Only child age 5 qualifies (age 6 does not)
250
+ ri_ctc_maximum: 2_500 # Base: 2 × $1_000 = $2_000; Boost: $500 (only age 5 child); Total = $2_500
251
+ ri_total_ctc: 2_500
252
+
253
+ - name: RI CTC - young child boost with multiple young children
254
+ absolute_error_margin: 0.1
255
+ period: 2025
256
+ reforms: policyengine_us.reforms.states.ri.ctc.ri_ctc_reform.ri_ctc
257
+ input:
258
+ gov.contrib.states.ri.ctc.in_effect: true
259
+ gov.contrib.states.ri.ctc.amount: 1_000
260
+ gov.contrib.states.ri.ctc.age_limit: 18
261
+ gov.contrib.states.ri.ctc.young_child_boost.amount: 500
262
+ gov.contrib.states.ri.ctc.young_child_boost.age_limit: 6
263
+ gov.contrib.states.ri.ctc.refundability.cap: 999_999
264
+ people:
265
+ parent:
266
+ age: 35
267
+ employment_income: 50_000
268
+ child1:
269
+ age: 2
270
+ is_tax_unit_dependent: true
271
+ child2:
272
+ age: 4
273
+ is_tax_unit_dependent: true
274
+ child3:
275
+ age: 10
276
+ is_tax_unit_dependent: true
277
+ tax_units:
278
+ tax_unit:
279
+ members: [parent, child1, child2, child3]
280
+ filing_status: SINGLE
281
+ households:
282
+ household:
283
+ members: [parent, child1, child2, child3]
284
+ state_name: RI
285
+ output:
286
+ ri_ctc_eligible_children: 3
287
+ ri_ctc_young_child_boost: 1_000 # 2 children under 6 × $500 = $1_000
288
+ ri_ctc_maximum: 4_000 # Base: 3 × $1_000 = $3_000; Boost: $1_000; Total = $4_000
289
+ ri_total_ctc: 4_000
290
+
291
+ - name: RI CTC - young child boost with no boost amount (zero)
292
+ absolute_error_margin: 0.1
293
+ period: 2025
294
+ reforms: policyengine_us.reforms.states.ri.ctc.ri_ctc_reform.ri_ctc
295
+ input:
296
+ gov.contrib.states.ri.ctc.in_effect: true
297
+ gov.contrib.states.ri.ctc.amount: 1_000
298
+ gov.contrib.states.ri.ctc.age_limit: 18
299
+ gov.contrib.states.ri.ctc.young_child_boost.amount: 0 # No boost
300
+ gov.contrib.states.ri.ctc.young_child_boost.age_limit: 6
301
+ gov.contrib.states.ri.ctc.refundability.cap: 999_999
302
+ people:
303
+ parent:
304
+ age: 35
305
+ employment_income: 50_000
306
+ child1:
307
+ age: 3
308
+ is_tax_unit_dependent: true
309
+ tax_units:
310
+ tax_unit:
311
+ members: [parent, child1]
312
+ filing_status: SINGLE
313
+ households:
314
+ household:
315
+ members: [parent, child1]
316
+ state_name: RI
317
+ output:
318
+ ri_ctc_eligible_children: 1
319
+ ri_ctc_young_child_boost: 0 # 1 child under 6 × $0 = $0
320
+ ri_ctc_maximum: 1_000 # Base: 1 × $1_000 = $1_000; Boost: $0; Total = $1_000
321
+ ri_total_ctc: 1_000
@@ -25,7 +25,7 @@
25
25
  members: [parent, child1, child2]
26
26
  state_name: RI
27
27
  output:
28
- ri_exemptions: 10_150 # 1 personal (5_050) + 1 dependent (5_100)
28
+ ri_exemptions: 15_200 # 1 personal (5_050) + 1 dependent (5_100) + 1 older dependent (5_050)
29
29
 
30
30
  - name: RI exemption reform - restrict to children under 13
31
31
  period: 2025
@@ -54,7 +54,7 @@
54
54
  members: [parent, child1, child2]
55
55
  state_name: RI
56
56
  output:
57
- ri_exemptions: 10_150 # 1 personal (5_050) + 1 dependent (5_100)
57
+ ri_exemptions: 15_200 # 1 personal (5_050) + 1 dependent (5_100) + 1 older dependent (5_050)
58
58
 
59
59
  - name: RI exemption reform - AGI phaseout
60
60
  period: 2025
@@ -12,6 +12,5 @@ class pell_grant_simplified_formula_applies(Variable):
12
12
  head_income = tax_unit("pell_grant_primary_income", period)
13
13
  p = parameters(period).gov.ed.pell_grant.efc.simplified
14
14
  income_eligible = head_income < p.income_limit
15
- total_benefits = add(tax_unit, period, p.benefits)
16
- has_benefits = np.any(total_benefits > 0)
15
+ has_benefits = add(tax_unit, period, p.benefits) > 0
17
16
  return income_eligible & has_benefits & p.applies
@@ -21,8 +21,8 @@ class is_lifeline_eligible(Variable):
21
21
  )
22
22
  categorically_eligible = np.where(
23
23
  is_on_tribal_land,
24
- np.any(tribal_lifeline_programs),
25
- np.any(non_tribal_lifeline_programs),
24
+ tribal_lifeline_programs > 0,
25
+ non_tribal_lifeline_programs > 0,
26
26
  )
27
27
  # Use the new unified income eligibility variable
28
28
  income_eligible = spm_unit("is_lifeline_income_eligible", period)
@@ -4,7 +4,8 @@ from policyengine_us.model_api import *
4
4
  class early_head_start(Variable):
5
5
  value_type = float
6
6
  entity = Person
7
- label = "Amount of Early Head Start benefit"
7
+ label = "Early Head Start"
8
+ unit = USD
8
9
  definition_period = YEAR
9
10
  defined_for = "is_early_head_start_eligible"
10
11
  reference = "https://headstart.gov/program-data/article/head-start-program-facts-fiscal-year-2022"
@@ -4,7 +4,8 @@ from policyengine_us.model_api import *
4
4
  class head_start(Variable):
5
5
  value_type = float
6
6
  entity = Person
7
- label = "Amount of Head Start benefit"
7
+ label = "Head Start"
8
+ unit = USD
8
9
  definition_period = YEAR
9
10
  defined_for = "is_head_start_eligible"
10
11
  reference = "https://headstart.gov/program-data/article/head-start-program-facts-fiscal-year-2022"
@@ -12,7 +12,5 @@ class is_head_start_categorically_eligible(Variable):
12
12
  )
13
13
 
14
14
  def formula(person, period, parameters):
15
- tax_unit = person.tax_unit
16
15
  p = parameters(period).gov.hhs.head_start
17
- programs = add(tax_unit, period, p.categorical_eligibility)
18
- return np.any(programs)
16
+ return add(person.tax_unit, period, p.categorical_eligibility) > 0
@@ -0,0 +1,13 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tanf_gross_earned_income(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ label = (
8
+ "Temporary Assistance for Needy Families (TANF) gross earned income"
9
+ )
10
+ unit = USD
11
+ definition_period = MONTH
12
+
13
+ adds = "gov.hhs.tanf.cash.income.sources.earned"
@@ -0,0 +1,13 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tanf_gross_unearned_income(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ label = (
8
+ "Temporary Assistance for Needy Families (TANF) gross unearned income"
9
+ )
10
+ unit = USD
11
+ definition_period = MONTH
12
+
13
+ adds = "gov.hhs.tanf.cash.income.sources.unearned"
@@ -0,0 +1,28 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tanf_fpg(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "TANF federal poverty guideline"
8
+ unit = USD
9
+ documentation = (
10
+ "The federal poverty guideline used to determine TANF eligibility."
11
+ )
12
+ definition_period = MONTH
13
+ reference = "https://www.law.cornell.edu/uscode/text/42/9902"
14
+
15
+ def formula(spm_unit, period, parameters):
16
+ # We can use tanf_unit_size for more accurate model in the future
17
+ n = spm_unit("spm_unit_size", period.this_year)
18
+ state_group = spm_unit.household("state_group_str", period.this_year)
19
+ year = period.start.year
20
+ month = period.start.month
21
+ if month >= 10:
22
+ instant_str = f"{year}-10-01"
23
+ else:
24
+ instant_str = f"{year - 1}-10-01"
25
+ p_fpg = parameters(instant_str).gov.hhs.fpg
26
+ p1 = p_fpg.first_person[state_group] / MONTHS_IN_YEAR
27
+ pn = p_fpg.additional_person[state_group] / MONTHS_IN_YEAR
28
+ return p1 + pn * (n - 1)
@@ -7,30 +7,4 @@ class income_elasticity(Variable):
7
7
  label = "income elasticity of labor supply"
8
8
  unit = "/1"
9
9
  definition_period = YEAR
10
- reference = [
11
- "https://www.cbo.gov/publication/43675",
12
- "https://www.cbo.gov/publication/43676",
13
- "https://academic.oup.com/restud/article-abstract/72/2/395/1558553",
14
- ]
15
-
16
- def formula(person, period, parameters):
17
- p = parameters(
18
- period
19
- ).gov.simulation.labor_supply_responses.elasticities.income
20
-
21
- # Check if global override is set
22
- if p.all != 0:
23
- return p.all
24
-
25
- # Get base income elasticity
26
- base_elasticity = p.base
27
-
28
- # Apply age multiplier for individuals at or above age threshold
29
- age = person("age", period.this_year)
30
- age_multiplier = where(
31
- age >= p.age_threshold,
32
- p.age_multiplier_over_threshold,
33
- 1.0, # No multiplier for under threshold
34
- )
35
-
36
- return base_elasticity * age_multiplier
10
+ adds = ["gov.simulation.labor_supply_responses.elasticities.income"]
@@ -7,18 +7,12 @@ class substitution_elasticity(Variable):
7
7
  label = "substitution elasticity of labor supply"
8
8
  unit = "/1"
9
9
  definition_period = YEAR
10
- reference = [
11
- "https://www.cbo.gov/publication/43675",
12
- "https://www.cbo.gov/publication/43676",
13
- "https://academic.oup.com/restud/article-abstract/72/2/395/1558553",
14
- ]
15
10
 
16
11
  def formula(person, period, parameters):
17
12
  p = parameters(
18
13
  period
19
14
  ).gov.simulation.labor_supply_responses.elasticities.substitution
20
15
 
21
- # Check for global override
22
16
  if p.all != 0:
23
17
  return p.all
24
18
 
@@ -36,7 +30,6 @@ class substitution_elasticity(Variable):
36
30
  1_726e3,
37
31
  ]
38
32
 
39
- # Calculate earnings
40
33
  raw_earnings = add(
41
34
  person,
42
35
  period,
@@ -45,59 +38,41 @@ class substitution_elasticity(Variable):
45
38
  "self_employment_income_before_lsr",
46
39
  ],
47
40
  )
48
- # Use max_ to prevent negative earnings from causing issues
49
41
  earnings = max_(raw_earnings, 0)
50
- # Use searchsorted with side='right' to bin earnings into deciles
51
- # This gives decile numbers 1-10 directly without needing to add 1
52
- earnings_decile = np.searchsorted(
53
- EARNINGS_DECILE_MARKERS, earnings, side="right"
42
+ earnings_decile = (
43
+ np.searchsorted(EARNINGS_DECILE_MARKERS, earnings) + 1
54
44
  )
55
45
 
56
- # Determine if primary earner (highest earner in tax unit)
57
46
  tax_unit = person.tax_unit
47
+ # Primary earner == highest earner in tax unit
58
48
  max_earnings_in_unit = tax_unit.max(earnings)
59
49
  is_primary_earner = earnings == max_earnings_in_unit
60
50
 
61
- # Get base elasticity from position and decile
62
- base_elasticity = np.zeros_like(earnings, dtype=float)
51
+ elasticities = np.zeros_like(earnings)
63
52
 
64
53
  # Handle zero earnings first
65
54
  zero_earnings = earnings == 0
66
- base_elasticity[zero_earnings] = 0
55
+ elasticities[zero_earnings] = 0
67
56
 
68
- # For non-zero earnings, assign base elasticities
57
+ # For non-zero earnings, assign elasticities
69
58
  non_zero_earnings = earnings > 0
70
59
 
71
60
  if np.any(non_zero_earnings):
72
- # Primary earners by decile
73
- for i in range(10): # Iterate through deciles 1-10
74
- decile_num = i + 1 # Decile numbers are 1-10
61
+ # First assign primary earner elasticities by decile
62
+ decile_elasticities = [
63
+ p.by_position_and_decile.primary._children[str(i + 1)]
64
+ for i in range(10)
65
+ ]
66
+ for i in range(10):
75
67
  mask = (
76
68
  non_zero_earnings
77
- & (earnings_decile == decile_num)
69
+ & (earnings_decile == i + 1)
78
70
  & is_primary_earner
79
71
  )
80
- if np.any(mask):
81
- # Access parameter using getattr to handle both normal and test scenarios
82
- decile_param = getattr(
83
- p.by_position_and_decile.primary, str(decile_num)
84
- )
85
- # Handle both Parameter objects and raw values (when overridden in tests)
86
- param_value = (
87
- decile_param(period)
88
- if callable(decile_param)
89
- else decile_param
90
- )
91
- base_elasticity[mask] = param_value
72
+ elasticities[mask] = decile_elasticities[i]
92
73
 
93
- # Secondary earners get zero elasticity (only primary earners have non-zero values)
74
+ # Then assign secondary earner elasticity where applicable
75
+ secondary_mask = non_zero_earnings & ~is_primary_earner
76
+ elasticities[secondary_mask] = p.by_position_and_decile.secondary
94
77
 
95
- # Apply age multiplier for individuals at or above age threshold
96
- age = person("age", period.this_year)
97
- age_multiplier = where(
98
- age >= p.age_threshold,
99
- p.age_multiplier_over_threshold,
100
- 1.0, # No multiplier for under threshold
101
- )
102
-
103
- return base_elasticity * age_multiplier
78
+ return elasticities
@@ -0,0 +1,41 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class is_ssi_spousal_deeming_applies(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "SSI spousal deeming applies"
8
+ definition_period = YEAR
9
+ reference = "https://www.law.cornell.edu/cfr/text/20/416.1163"
10
+ defined_for = "is_ssi_eligible_individual"
11
+ documentation = """
12
+ Returns True when spousal deeming applies according to 20 CFR §416.1163.
13
+
14
+ Spousal deeming applies when:
15
+ 1. Person is an eligible individual (not part of an eligible couple)
16
+ 2. Spouse is ineligible (not aged/blind/disabled)
17
+ 3. Spouse's leftover income (after child allocations) exceeds the difference
18
+ between couple FBR and individual FBR
19
+
20
+ When deeming applies, the benefit calculation uses the couple FBR instead
21
+ of the individual FBR, recognizing that two people have higher expenses.
22
+ """
23
+
24
+ def formula(person, period, parameters):
25
+ # Get spouse's deemed income (after child allocations)
26
+ spouse_deemed_income = add(
27
+ person,
28
+ period,
29
+ [
30
+ "ssi_earned_income_deemed_from_ineligible_spouse",
31
+ "ssi_unearned_income_deemed_from_ineligible_spouse",
32
+ ],
33
+ )
34
+
35
+ # Compare to FBR differential (couple rate - individual rate)
36
+ p = parameters(period).gov.ssa.ssi.amount
37
+ diff = (p.couple - p.individual) * MONTHS_IN_YEAR
38
+
39
+ # Deeming applies when spouse's deemed income exceeds the differential
40
+ # Note: regulation says "not more than" means ≤, so we use > for deeming
41
+ return spouse_deemed_income > diff