From 688158b96baa324079b65ea6ff02099eddfd3bc5 Mon Sep 17 00:00:00 2001 From: Ziming Date: Sun, 11 Jan 2026 11:44:21 -0500 Subject: [PATCH 1/6] Implement Arizona TANF (cash assistance) program Fixes #7149 --- changelog_entry.yaml | 2 +- .../age_threshold/non_student.yaml | 2 +- .../eligibility/age_threshold/student.yaml | 2 +- .../income/earned/care_expenses/adult.yaml | 11 + .../earned/care_expenses/child_amounts.yaml | 20 ++ .../tanf/eligibility/income/earned/flat.yaml | 11 + .../eligibility/income/earned/percentage.yaml | 11 + .../eligibility/payment_standard/high.yaml | 15 ++ .../eligibility/payment_standard/low.yaml | 17 ++ .../az/hhs/tanf/eligibility/rate/base.yaml | 11 + .../hhs/tanf/eligibility/rate/non_parent.yaml | 11 + ..._earned_income_care_expense_disregard.yaml | 240 ++++++++++++++++++ .../az/hhs/tanf/az_tanf_earned_income.yaml | 120 +++++++++ .../tanf/eligibility/az_cash_assistance.yaml | 31 +++ .../hhs/tanf/eligibility/az_fpg_baseline.yaml | 17 ++ .../az/hhs/tanf/eligibility/az_fpg_rate.yaml | 31 +++ .../eligibility/az_hhs_tanf_eligible.yaml | 35 +++ .../az_payment_standard_threshold.yaml | 41 +++ ...nf_earned_income_care_expense_disregard.py | 33 +++ .../az/hhs/tanf/az_tanf_earned_income.py | 29 +++ .../tanf/eligibility/az_cash_assistance.py | 23 ++ .../hhs/tanf/eligibility/az_fpg_baseline.py | 20 ++ .../az/hhs/tanf/eligibility/az_fpg_rate.py | 17 ++ .../tanf/eligibility/az_hhs_tanf_eligible.py | 31 +++ .../az_payment_standard_threshold.py | 21 ++ 25 files changed, 799 insertions(+), 3 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index f8f61c000cc..62826815277 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Add Florida Temporary Cash Assistance (TCA) program. + - Arizona Cash Assistance (TANF) program. diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml index e4fa0f7face..d8e31d5787f 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml @@ -8,4 +8,4 @@ metadata: href: https://az.db101.org/az/programs/income_support/tanf/program2.htm values: - 2023-01-01: 18 + 2022-10-01: 18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml index c84a9b9a34f..7cac383df73 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml @@ -8,4 +8,4 @@ metadata: href: https://az.db101.org/az/programs/income_support/tanf/program2.htm values: - 2023-01-01: 19 + 2022-10-01: 19 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml new file mode 100644 index 00000000000..fb8e59b3c61 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml @@ -0,0 +1,11 @@ +description: Arizona subtracts this amount of care expenses for disabled adults from earned income under the cash assistance program. +metadata: + unit: currency-USD + label: Arizona Cash Assistance disabled adults care expense disregard + period: month + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA + +values: + 2022-10-01: 175 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml new file mode 100644 index 00000000000..638a003ec12 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml @@ -0,0 +1,20 @@ +description: Arizona sets different thresholds for the amount of care expense disregard for children under different age for payment standard eligibility test. +metadata: + type: single_amount + label: Arizona Cash Assistance care expense income subtraction threshold for children under or over age threshold + period: month + threshold_unit: year + amount_unit: currency-USD + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA + +brackets: + - threshold: + 2022-10-01: 0 + amount: + 2022-10-01: 200 + - threshold: + 2022-10-01: 2 + amount: + 2022-10-01: 175 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml new file mode 100644 index 00000000000..0f05546f0ac --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml @@ -0,0 +1,11 @@ +description: Arizona disregards this amount of earned income under the cash assistance program. +metadata: + unit: currency-USD + label: Arizona Cash Assistance flat earned income disregard + period: month + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA + +values: + 2022-10-01: 90 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml new file mode 100644 index 00000000000..40adf4eb66d --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml @@ -0,0 +1,11 @@ +description: Arizona disregards this percentage of earned income after the flat amount disregard, under the cash assistance program. +metadata: + unit: /1 + label: Arizona Cash Assistance preliminary earned income percentage disregard + period: month + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA + +values: + 2022-10-01: 0.3 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml new file mode 100644 index 00000000000..b5610304b21 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml @@ -0,0 +1,15 @@ +description: Arizona multiplies the 1992 federal poverty guidelines by the following rate when calculating the higher payment standard. + +metadata: + unit: /1 + period: year + label: Arizona cash assistance higher payment standard rate + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA + - title: Arizona Department of Economic Security - Cash Assistance (CA) A1 chart + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/A1_Payment_Standards.html#wwpID0E0MM0HA + +values: + 2022-10-01: 0.288 + 2023-12-01: 0.36 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml new file mode 100644 index 00000000000..6f8fc637ab9 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml @@ -0,0 +1,17 @@ +description: Arizona multiplies the 1992 federal poverty guidelines by the following rate when calculating the lower payment standard. + +metadata: + unit: /1 + period: year + label: Arizona cash assistance lower payment standard rate + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA + # The source rounds the results to a percentage of 22.65 instead of 23%, which is defined in the manual. + - title: Arizona Department of Economic Security - Cash Assistance (CA) A2 chart + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/A2_Payment_Standards.html#wwpID0E0DM0HA + + +values: + 2022-10-01: 0.184 + 2023-12-01: 0.23 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml new file mode 100644 index 00000000000..33c7e548f12 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml @@ -0,0 +1,11 @@ +description: Arizona limits the cash assistance program to families with income below this percentage of federal poverty guidelines. +metadata: + unit: /1 + label: Arizona Cash Assistance needy family countable income percentage limit + period: year + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA + +values: + 2022-10-01: 1 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml new file mode 100644 index 00000000000..f5310b5c851 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml @@ -0,0 +1,11 @@ +description: Arizona limits the cash assistance program to families where head-of-household is a non-parent relative with income below this percentage of federal poverty guidelines. +metadata: + unit: /1 + label: Arizona Cash Assistance needy family countable income percentage limit + period: year + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA + +values: + 2022-10-01: 1.3 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml new file mode 100644 index 00000000000..e85ffb28687 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml @@ -0,0 +1,240 @@ +- name: Spend 190 on an 1 year old kid + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 1 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1] + childcare_expenses: 2_280 + households: + household: + members: [person1] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 190 + +- name: Spend 210 on an 1 year old kid, capped at max + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 1 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1] + childcare_expenses: 2_520 + households: + household: + members: [person1] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 200 + +- name: Spend 170 on a 2 year old kid + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 2 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1] + childcare_expenses: 2_040 + households: + household: + members: [person1] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 170 + +- name: Spend 180 on a 2 years old kid, capped at max + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 2 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1] + childcare_expenses: 2_160 + households: + household: + members: [person1] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 175 + +- name: Spend 170 on an disabled adult + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: true + spm_units: + spm_unit: + members: [person1] + childcare_expenses: 2_040 + households: + household: + members: [person1] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 170 + +- name: Spend 180 on an adult with disability, capped at max + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: true + spm_units: + spm_unit: + members: [person1] + childcare_expenses: 2_160 + households: + household: + members: [person1] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 175 + +- name: Spend 180 on an adult with disability, one not eligible adult + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: true + person2: + age: 20 + az_tanf_eligible_child: false + is_disabled: false + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 2_160 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 175 + +- name: Spend 180 on an adult with disability, and spend 190 on an 1 year old kid + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: true + person2: + age: 1 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 4_440 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 370 + +- name: Spend 180 on an adult with disability, and spend 190 on an 2 year old kid (Both capped at max) + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: true + person2: + age: 2 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 4_440 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 350 + +- name: Both adults are not eligible for the cash assistance program + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: false + person2: + age: 25 + az_tanf_eligible_child: false + is_disabled: false + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 1_000 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 0 + +- name: The household have no care expense even though they have eligible menbers + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + age: 22 + az_tanf_eligible_child: false + is_disabled: true + person2: + age: 1 + az_tanf_eligible_child: true + is_disabled: false + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 0 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_hhs_tanf_earned_income_care_expense_disregard: 0 + diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml new file mode 100644 index 00000000000..56ad0426639 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml @@ -0,0 +1,120 @@ +- name: Arizona has an earned income disregard of 4_440 under its cash assistance program + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + earned_income: 7_500 + person2: + earned_income: 7_500 + spm_units: + spm_unit: + members: [person1, person2] + az_hhs_tanf_earned_income_care_expense_disregard: 370 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_earned_income: 442 + +- name: Arizona has an earned income disregard of 2_100 under its cash assistance program + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + earned_income: 7_500 + person2: + earned_income: 7_500 + spm_units: + spm_unit: + members: [person1, person2] + az_hhs_tanf_earned_income_care_expense_disregard: 175 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_earned_income: 637 + +- name: Arizona has an earned income disregard of 2_100 under its cash assistance program (with little earned income) + period: 2023-01 + absolute_error_margin: 0.01 + input: + people: + person1: + earned_income: 500 + person2: + earned_income: 500 + spm_units: + spm_unit: + members: [person1, person2] + az_hhs_tanf_earned_income_care_expense_disregard: 175 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_earned_income: 0 + +- name: Arizona has an earned income disregard of 4_440 under its cash assistance program (yearly aggregated) + period: 2023 + absolute_error_margin: 0.01 + input: + people: + person1: + earned_income: 7_500 + person2: + earned_income: 7_500 + spm_units: + spm_unit: + members: [person1, person2] + az_hhs_tanf_earned_income_care_expense_disregard: 4_440 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_earned_income: 5_304 + +- name: Arizona has an earned income disregard of 2_100 under its cash assistance program (yearly aggregated) + period: 2023 + absolute_error_margin: 0.01 + input: + people: + person1: + earned_income: 7_500 + person2: + earned_income: 7_500 + spm_units: + spm_unit: + members: [person1, person2] + az_hhs_tanf_earned_income_care_expense_disregard: 2_100 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_earned_income: 7_644 + +- name: Arizona has an earned income disregard of 2_100 under its cash assistance program (with little earned income) (yearly aggregated) + period: 2023 + absolute_error_margin: 0.01 + input: + people: + person1: + earned_income: 500 + person2: + earned_income: 500 + spm_units: + spm_unit: + members: [person1, person2] + az_hhs_tanf_earned_income_care_expense_disregard: 2_100 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_earned_income: 0 + diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml new file mode 100644 index 00000000000..bf3e5afad6e --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml @@ -0,0 +1,31 @@ +- name: The eligible family without shelter cost receives cash assistance under low payment standard + period: 2024-01 + absolute_error_margin: 3 + #have rounding errors with the 23% when calculating payment standard + input: + az_payment_standard_threshold: 218 + az_tanf_earned_income: 147 + az_hhs_tanf_eligible: true + output: + az_cash_assistance: 71 + +- name: The eligible family without shelter cost receives cash assistance under low payment standard + period: 2023-01 + absolute_error_margin: 3 + input: + az_payment_standard_threshold: 175 + az_tanf_earned_income: 147 + az_hhs_tanf_eligible: true + output: + az_cash_assistance: 28 + +- name: The family earns above payment standard threshold, therefore gets no cash assistance + period: 2023-01 + absolute_error_margin: 3 + input: + az_payment_standard_threshold: 175 + az_tanf_earned_income: 1_000 + az_hhs_tanf_eligible: true + output: + az_cash_assistance: 0 + diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml new file mode 100644 index 00000000000..83d0963a046 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml @@ -0,0 +1,17 @@ +- name: The 1992 fpg baseline for a family of 1 + period: 2024 + absolute_error_margin: 1 + input: + spm_unit_size: 1 + state_code: AZ + output: + az_fpg_baseline: 6_810 + +- name: The 1992 fpg baseline for a family of 4 + period: 2021 + absolute_error_margin: 1 + input: + spm_unit_size: 4 + state_code: AZ + output: + az_fpg_baseline: 13_950 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml new file mode 100644 index 00000000000..513371814ff --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml @@ -0,0 +1,31 @@ +- name: Head of tax unit is a parent + period: 2023 + input: + people: + person1: + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + is_tax_unit_head: false + is_parent_of_filer_or_spouse: true + spm_units: + spm_unit: + members: [person1, person2] + output: + az_fpg_rate: 1 + +- name: Head of tax unit is not a parent + period: 2023 + input: + people: + person1: + is_tax_unit_head: true + is_parent_of_filer_or_spouse: false + person2: + is_tax_unit_head: false + is_parent_of_filer_or_spouse: false + spm_units: + spm_unit: + members: [person1, person2] + output: + az_fpg_rate: 1.3 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml new file mode 100644 index 00000000000..eeefdf3e49f --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml @@ -0,0 +1,35 @@ +- name: The family meets both payment standard and fpg standard restrictions + period: 2024-01 + absolute_error_margin: 0.01 + input: + spm_unit_size: 3 + az_tanf_earned_income: 175 + az_payment_standard_threshold: 278 + az_fpg_rate: 1 + state_code: AZ + output: + az_hhs_tanf_eligible: true + +- name: The family earning is above payment standard + period: 2023-01 + absolute_error_margin: 0.01 + input: + spm_unit_size: 3 + az_tanf_earned_income: 175 + az_payment_standard_threshold: 150 + az_fpg_rate: 1 + state_code: AZ + output: + az_hhs_tanf_eligible: false + +- name: The family earning is above payment standard + period: 2023-01 + absolute_error_margin: 0.01 + input: + spm_unit_size: 3 + az_tanf_earned_income: 175 + az_payment_standard_threshold: 278 + az_fpg_rate: 1.3 + state_code: AZ + output: + az_hhs_tanf_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml new file mode 100644 index 00000000000..cf5b7248fda --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml @@ -0,0 +1,41 @@ +- name: The family of 3 do not spend shelter cost (under the latest standard) + period: 2024-01 + absolute_error_margin: 5 + #have rounding errors with the 23% when calculating payment standard + input: + az_fpg_baseline: 11_570 + housing_cost: 0 + state_code: AZ + output: + az_payment_standard_threshold: 218 + +- name: The family of 3 do not spend shelter cost (under the previous standard) + period: 2023-01 + absolute_error_margin: 5 + #have rounding errors with the 23% when calculating payment standard + input: + az_fpg_baseline: 11_570 + housing_cost: 0 + state_code: AZ + output: + az_payment_standard_threshold: 175 + +- name: The family of 3 spend shelter cost (under the latest standard) + period: 2024-01 + absolute_error_margin: 1 + input: + az_fpg_baseline: 11_570 + housing_cost: 100 + state_code: AZ + output: + az_payment_standard_threshold: 347 + +- name: The family of 3 spend shelter cost (under the previous standard) + period: 2023-01 + absolute_error_margin: 1 + input: + az_fpg_baseline: 11_570 + housing_cost: 100 + state_code: AZ + output: + az_payment_standard_threshold: 278 diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py new file mode 100644 index 00000000000..f3390ec8758 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * + + +class az_hhs_tanf_earned_income_care_expense_disregard(Variable): + value_type = float + entity = SPMUnit + label = "Arizona Cash Assistance care expense earned income disregard" + definition_period = MONTH + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + p = parameters( + period + ).gov.states.az.hhs.tanf.eligibility.income.earned.care_expenses + # Get the age of the child(children) and the disabled adult(s) + person = spm_unit.members + age = person("age", period) * MONTHS_IN_YEAR + # Get the childcare and disabled adult care expenses + care_expenses = add( + spm_unit, period, ["childcare_expenses", "care_expenses"] + ) + # Determine the total eligible disregard + # The eligibility reuquirements consider whether children or disabled adults + is_child = person("az_tanf_eligible_child", period) + child = person("is_child", period) + disabled_adult = person("is_disabled", period) & ~child + # Calculate eligible child disregard + child_amount = p.child_amounts.calc(age) * is_child + # Calculate eligible disabled adult disregard + adult_amount = disabled_adult * p.adult + total_amount = spm_unit.sum(child_amount + adult_amount) + # The disregard is capped at the expenses + return min_(care_expenses, total_amount) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py new file mode 100644 index 00000000000..7b911b56616 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py @@ -0,0 +1,29 @@ +from policyengine_us.model_api import * + + +class az_tanf_earned_income(Variable): + value_type = float + entity = SPMUnit + label = "Earned income for the Arizona Cash Assistance" + definition_period = MONTH + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Earned income of the spm unit + monthly_income = add(spm_unit, period, ["earned_income"]) + # Determine the expense discount + p = parameters(period).gov.states.az.hhs.tanf.eligibility.income.earned + # Yearly subtracted income disregard + # Income after subtracting constant value and certain percentage + income_after_flat_disregard = max_(monthly_income - p.flat, 0) + income_percentage_disregard = income_after_flat_disregard * ( + 1 - p.percentage + ) + # Calculate countable earned income by further subtracting earned income disregard + earned_income_care_expense_disregard = spm_unit( + "az_hhs_tanf_earned_income_care_expense_disregard", period + ) + return max_( + income_percentage_disregard - earned_income_care_expense_disregard, + 0, + ) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py new file mode 100644 index 00000000000..fa7d5fd2c62 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py @@ -0,0 +1,23 @@ +from policyengine_us.model_api import * + + +class az_cash_assistance(Variable): + value_type = float + entity = SPMUnit + label = "Arizona Cash Assistance Payment" + definition_period = MONTH + reference = ( + "https://az.db101.org/az/programs/income_support/tanf/program2.htm" + ) + defined_for = "az_hhs_tanf_eligible" + + def formula(spm_unit, period, parameters): + payment_standard_threshold = spm_unit( + "az_payment_standard_threshold", period + ) + monthly_countable_earned_income = spm_unit( + "az_tanf_earned_income", period + ) + return max_( + payment_standard_threshold - monthly_countable_earned_income, 0 + ) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py new file mode 100644 index 00000000000..89f37568862 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py @@ -0,0 +1,20 @@ +from policyengine_us.model_api import * + + +class az_fpg_baseline(Variable): + value_type = float + entity = SPMUnit + label = "Arizona Cash Assistance Payment Standard fpg Baseline" + definition_period = YEAR + reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + intant_str = f"1992-01-01" + household_size = spm_unit("spm_unit_size", period) + cap_household_size = max_(household_size, 0) + state_group = spm_unit.household("state_group_str", period) + p_fpg = parameters(intant_str).gov.hhs.fpg + p1 = p_fpg.first_person[state_group] + pn = p_fpg.additional_person[state_group] + return p1 + pn * (cap_household_size - 1) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py new file mode 100644 index 00000000000..6280637d0c8 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class az_fpg_rate(Variable): + value_type = float + entity = SPMUnit + label = "Needy family Federal Poverty Guideline Percentage Limit" + definition_period = YEAR + + def formula(spm_unit, period, parameters): + # Determine whether the head-of-household is a non-parent relative + p = parameters(period).gov.states.az.hhs.tanf.eligibility.rate + person = spm_unit.members + tax_unit_head = person("is_tax_unit_head", period) + parent = person("is_parent_of_filer_or_spouse", period) + eligible_parent_present = spm_unit.any(tax_unit_head & parent) + return where(eligible_parent_present, p.base, p.non_parent) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py new file mode 100644 index 00000000000..aa2af5e421d --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py @@ -0,0 +1,31 @@ +from policyengine_us.model_api import * + + +class az_hhs_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Eligible for the Arizona Cash Assistance" + definition_period = MONTH + reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + monthly_fpg = spm_unit("spm_unit_fpg", period) + monthly_countable_earned_income = spm_unit( + "az_tanf_earned_income", period + ) + payment_standard_threshold = spm_unit( + "az_payment_standard_threshold", period + ) + # Judge whether the unit is considered a needy family + # (countable income is below 100% of Federal Poverty Guideline) + fpg_rate = spm_unit("az_fpg_rate", period) + income_eligibility = ( + monthly_countable_earned_income <= fpg_rate * monthly_fpg + ) + # Judge whether the countable income exceed the Cash Assistance Payment Standard + payment_standard_eligibility = ( + monthly_countable_earned_income <= payment_standard_threshold + ) + # The family is eligible for the cash assistance only when the two criteria are met at the same time + return income_eligibility & payment_standard_eligibility diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py new file mode 100644 index 00000000000..77933aa4bb0 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class az_payment_standard_threshold(Variable): + value_type = float + entity = SPMUnit + label = "Arizona Cash Assistance Payment Standard" + definition_period = MONTH + reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + monthly_fpg_baseline = spm_unit("az_fpg_baseline", period) + p = parameters( + period + ).gov.states.az.hhs.tanf.eligibility.payment_standard + high_threshold = p.high * monthly_fpg_baseline + low_threshold = p.low * monthly_fpg_baseline + shelter_cost = spm_unit("housing_cost", period) + + return where(shelter_cost > 0, high_threshold, low_threshold) From 62485fa1c0024ea0e50da54c294d715532dead87 Mon Sep 17 00:00:00 2001 From: Ziming Date: Sun, 11 Jan 2026 12:20:36 -0500 Subject: [PATCH 2/6] fix --- policyengine_us/parameters/gov/hhs/fpg.yaml | 6 + .../age_threshold/non_student.yaml | 11 - .../eligibility/age_threshold/student.yaml | 11 - .../income/earned/care_expenses/adult.yaml | 5 +- .../earned/care_expenses/child_amounts.yaml | 5 +- .../tanf/eligibility/income/earned/flat.yaml | 5 +- .../eligibility/income/earned/percentage.yaml | 5 +- .../eligibility/payment_standard/high.yaml | 4 +- .../eligibility/payment_standard/low.yaml | 4 +- .../az/hhs/tanf/eligibility/rate/base.yaml | 5 +- .../hhs/tanf/eligibility/rate/non_parent.yaml | 5 +- .../states/az/hhs/tanf/resources/limit.yaml | 12 + ..._earned_income_care_expense_disregard.yaml | 240 ---------- .../gov/states/az/hhs/tanf/az_tanf.yaml | 232 +++++++++ .../tanf/az_tanf_countable_earned_income.yaml | 116 +++++ .../az/hhs/tanf/az_tanf_countable_income.yaml | 116 +++++ .../az_tanf_dependent_care_deduction.yaml | 139 ++++++ .../az/hhs/tanf/az_tanf_earned_income.yaml | 120 ----- ..._earned_income_after_disregard_person.yaml | 96 ++++ .../states/az/hhs/tanf/az_tanf_eligible.yaml | 178 +++++++ .../az/hhs/tanf/az_tanf_fpg_baseline.yaml | 109 +++++ .../states/az/hhs/tanf/az_tanf_fpg_rate.yaml | 78 +++ .../az/hhs/tanf/az_tanf_income_eligible.yaml | 149 ++++++ .../az/hhs/tanf/az_tanf_payment_standard.yaml | 162 +++++++ .../hhs/tanf/az_tanf_resources_eligible.yaml | 102 ++++ .../tanf/eligibility/az_cash_assistance.yaml | 31 -- .../hhs/tanf/eligibility/az_fpg_baseline.yaml | 17 - .../az/hhs/tanf/eligibility/az_fpg_rate.yaml | 31 -- .../eligibility/az_hhs_tanf_eligible.yaml | 35 -- .../az_payment_standard_threshold.yaml | 41 -- .../eligibility/az_tanf_eligible_child.yaml | 35 -- .../gov/states/az/hhs/tanf/integration.yaml | 450 ++++++++++++++++++ ...nf_earned_income_care_expense_disregard.py | 33 -- .../gov/states/az/hhs/tanf/az_tanf.py | 16 + .../az/hhs/tanf/az_tanf_earned_income.py | 29 -- .../tanf/eligibility/az_cash_assistance.py | 23 - .../az/hhs/tanf/eligibility/az_fpg_rate.py | 17 - .../tanf/eligibility/az_hhs_tanf_eligible.py | 31 -- .../az_payment_standard_threshold.py | 21 - .../hhs/tanf/eligibility/az_tanf_eligible.py | 27 ++ .../eligibility/az_tanf_eligible_child.py | 19 - ...pg_baseline.py => az_tanf_fpg_baseline.py} | 15 +- .../hhs/tanf/eligibility/az_tanf_fpg_rate.py | 21 + .../eligibility/az_tanf_income_eligible.py | 24 + .../eligibility/az_tanf_payment_standard.py | 32 ++ .../eligibility/az_tanf_resources_eligible.py | 17 + .../income/az_tanf_countable_earned_income.py | 22 + .../tanf/income/az_tanf_countable_income.py | 13 + .../az_tanf_dependent_care_deduction.py | 38 ++ ...nf_earned_income_after_disregard_person.py | 22 + 50 files changed, 2208 insertions(+), 767 deletions(-) delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py delete mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py rename policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/{az_fpg_baseline.py => az_tanf_fpg_baseline.py} (63%) create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py create mode 100644 policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py diff --git a/policyengine_us/parameters/gov/hhs/fpg.yaml b/policyengine_us/parameters/gov/hhs/fpg.yaml index a2409534556..a8d69df7635 100644 --- a/policyengine_us/parameters/gov/hhs/fpg.yaml +++ b/policyengine_us/parameters/gov/hhs/fpg.yaml @@ -1,6 +1,7 @@ description: Federal poverty guidelines published by the Department of Health and Human Services. first_person: CONTIGUOUS_US: + 1992-01-01: 6_810 2015-01-01: 11_770 2016-01-01: 11_880 2017-01-01: 12_060 @@ -13,6 +14,7 @@ first_person: 2024-01-01: 15_060 2025-01-01: 15_650 AK: + 1992-01-01: 8_500 2015-01-01: 14_720 2016-01-01: 14_840 2017-01-01: 15_060 @@ -25,6 +27,7 @@ first_person: 2024-01-01: 18_810 2025-01-01: 19_550 HI: + 1992-01-01: 7_830 2015-01-01: 13_550 2016-01-01: 13_670 2017-01-01: 13_860 @@ -50,6 +53,7 @@ additional_person: # Calculated by subtracting a two-person household's line from a one-person's. # This difference is always the same for larger households. CONTIGUOUS_US: + 1992-01-01: 2_380 2015-01-01: 4_160 2016-01-01: 4_160 2017-01-01: 4_180 @@ -62,6 +66,7 @@ additional_person: 2024-01-01: 5_380 2025-01-01: 5_500 AK: + 1992-01-01: 2_980 2015-01-01: 5_200 2016-01-01: 5_200 2017-01-01: 5_230 @@ -74,6 +79,7 @@ additional_person: 2024-01-01: 6_730 2025-01-01: 6_880 HI: + 1992-01-01: 2_740 2015-01-01: 4_780 2016-01-01: 4_780 2017-01-01: 4_810 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml deleted file mode 100644 index d8e31d5787f..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Arizona limits the cash assistance to filers with non-student children below this age threshold. -metadata: - unit: year - label: Arizona cash assistance non-student age threshold - period: year - reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Eligibility and Application - href: https://az.db101.org/az/programs/income_support/tanf/program2.htm - -values: - 2022-10-01: 18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml deleted file mode 100644 index 7cac383df73..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Arizona limits the cash assistance to filers with student children below this age threshold. -metadata: - unit: year - label: Arizona cash assistance student age threshold - period: year - reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines - href: https://az.db101.org/az/programs/income_support/tanf/program2.htm - -values: - 2022-10-01: 19 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml index fb8e59b3c61..69f60d01b72 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml @@ -1,8 +1,9 @@ -description: Arizona subtracts this amount of care expenses for disabled adults from earned income under the cash assistance program. +description: Arizona deducts this amount of dependent care expenses for disabled adults under the Temporary Assistance for Needy Families program. + metadata: unit: currency-USD - label: Arizona Cash Assistance disabled adults care expense disregard period: month + label: Arizona TANF disabled adult dependent care deduction reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml index 638a003ec12..f786662d33a 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml @@ -1,10 +1,11 @@ -description: Arizona sets different thresholds for the amount of care expense disregard for children under different age for payment standard eligibility test. +description: Arizona deducts this amount of dependent care expenses under the Temporary Assistance for Needy Families program. + metadata: type: single_amount - label: Arizona Cash Assistance care expense income subtraction threshold for children under or over age threshold period: month threshold_unit: year amount_unit: currency-USD + label: Arizona TANF child dependent care deduction reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml index 0f05546f0ac..f77ef7b8ecd 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml @@ -1,8 +1,9 @@ -description: Arizona disregards this amount of earned income under the cash assistance program. +description: Arizona excludes this amount of earned income under the Temporary Assistance for Needy Families program. + metadata: unit: currency-USD - label: Arizona Cash Assistance flat earned income disregard period: month + label: Arizona TANF flat earned income disregard reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml index 40adf4eb66d..33860dd9755 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml @@ -1,8 +1,9 @@ -description: Arizona disregards this percentage of earned income after the flat amount disregard, under the cash assistance program. +description: Arizona excludes this share of earned income under the Temporary Assistance for Needy Families program. + metadata: unit: /1 - label: Arizona Cash Assistance preliminary earned income percentage disregard period: month + label: Arizona TANF earned income percentage disregard reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml index b5610304b21..c9e9462dc41 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml @@ -1,9 +1,9 @@ -description: Arizona multiplies the 1992 federal poverty guidelines by the following rate when calculating the higher payment standard. +description: Arizona uses this rate of the federal poverty guideline to calculate the higher payment standard under the Temporary Assistance for Needy Families program. metadata: unit: /1 period: year - label: Arizona cash assistance higher payment standard rate + label: Arizona TANF higher payment standard rate reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml index 6f8fc637ab9..96dd9b7d4a0 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml @@ -1,9 +1,9 @@ -description: Arizona multiplies the 1992 federal poverty guidelines by the following rate when calculating the lower payment standard. +description: Arizona uses this rate of the federal poverty guideline to calculate the lower payment standard under the Temporary Assistance for Needy Families program. metadata: unit: /1 period: year - label: Arizona cash assistance lower payment standard rate + label: Arizona TANF lower payment standard rate reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml index 33c7e548f12..409cae39165 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml @@ -1,8 +1,9 @@ -description: Arizona limits the cash assistance program to families with income below this percentage of federal poverty guidelines. +description: Arizona limits income to this share of the federal poverty guideline under the Temporary Assistance for Needy Families program. + metadata: unit: /1 - label: Arizona Cash Assistance needy family countable income percentage limit period: year + label: Arizona TANF income limit rate reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml index f5310b5c851..ddfdfd64442 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml @@ -1,8 +1,9 @@ -description: Arizona limits the cash assistance program to families where head-of-household is a non-parent relative with income below this percentage of federal poverty guidelines. +description: Arizona limits income to this share of the federal poverty guideline for non-parent relative households under the Temporary Assistance for Needy Families program. + metadata: unit: /1 - label: Arizona Cash Assistance needy family countable income percentage limit period: year + label: Arizona TANF non-parent income limit rate reference: - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml new file mode 100644 index 00000000000..06a852e0aad --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml @@ -0,0 +1,12 @@ +description: Arizona limits resources to this amount under the Temporary Assistance for Needy Families program. + +values: + 2022-10-01: 2_000 + +metadata: + unit: currency-USD + period: month + label: Arizona TANF resource limit + reference: + - title: Arizona Department of Economic Security - Cash Assistance (CA) Eligibility + href: https://az.db101.org/az/programs/income_support/tanf/program2.htm diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml deleted file mode 100644 index e85ffb28687..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.yaml +++ /dev/null @@ -1,240 +0,0 @@ -- name: Spend 190 on an 1 year old kid - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 1 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1] - childcare_expenses: 2_280 - households: - household: - members: [person1] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 190 - -- name: Spend 210 on an 1 year old kid, capped at max - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 1 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1] - childcare_expenses: 2_520 - households: - household: - members: [person1] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 200 - -- name: Spend 170 on a 2 year old kid - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 2 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1] - childcare_expenses: 2_040 - households: - household: - members: [person1] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 170 - -- name: Spend 180 on a 2 years old kid, capped at max - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 2 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1] - childcare_expenses: 2_160 - households: - household: - members: [person1] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 175 - -- name: Spend 170 on an disabled adult - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: true - spm_units: - spm_unit: - members: [person1] - childcare_expenses: 2_040 - households: - household: - members: [person1] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 170 - -- name: Spend 180 on an adult with disability, capped at max - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: true - spm_units: - spm_unit: - members: [person1] - childcare_expenses: 2_160 - households: - household: - members: [person1] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 175 - -- name: Spend 180 on an adult with disability, one not eligible adult - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: true - person2: - age: 20 - az_tanf_eligible_child: false - is_disabled: false - spm_units: - spm_unit: - members: [person1, person2] - childcare_expenses: 2_160 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 175 - -- name: Spend 180 on an adult with disability, and spend 190 on an 1 year old kid - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: true - person2: - age: 1 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1, person2] - childcare_expenses: 4_440 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 370 - -- name: Spend 180 on an adult with disability, and spend 190 on an 2 year old kid (Both capped at max) - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: true - person2: - age: 2 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1, person2] - childcare_expenses: 4_440 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 350 - -- name: Both adults are not eligible for the cash assistance program - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: false - person2: - age: 25 - az_tanf_eligible_child: false - is_disabled: false - spm_units: - spm_unit: - members: [person1, person2] - childcare_expenses: 1_000 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 0 - -- name: The household have no care expense even though they have eligible menbers - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - age: 22 - az_tanf_eligible_child: false - is_disabled: true - person2: - age: 1 - az_tanf_eligible_child: true - is_disabled: false - spm_units: - spm_unit: - members: [person1, person2] - childcare_expenses: 0 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_hhs_tanf_earned_income_care_expense_disregard: 0 - diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml new file mode 100644 index 00000000000..2695ff60ae1 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml @@ -0,0 +1,232 @@ +# Unit tests for Arizona TANF benefit amount +# Benefit = Payment Standard - Countable Income (if eligible) +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, full benefit with no income. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Family of 2, with shelter (A1) + # Payment standard: ~$276 + # Countable income: $0 + # Benefit: $276 - $0 = $276 + az_tanf: 276 + +- name: Case 2, partial benefit with income. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 3_600 # $300/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $300 - $90 = $210, * 0.70 = $147 + # Payment standard (A1 for family of 2): ~$276 + # Benefit: $276 - $147 = $129 + az_tanf: 129 + +- name: Case 3, no benefit due to high income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 24_000 # $2,000/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # High income - ineligible, benefit = 0 + az_tanf: 0 + +- name: Case 4, larger family full benefit. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + person3: + age: 3 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_000 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Family of 3, with shelter (A1) + # Payment standard: ~$347 + # Countable income: $0 + # Benefit: $347 + az_tanf: 347 + +- name: Case 5, benefit with unearned income. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 0 + child_support_received: 1_200 # $100/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Unearned income (no disregard): $100 + # Payment standard (A1 for family of 2): ~$276 + # Benefit: $276 - $100 = $176 + az_tanf: 176 + +- name: Case 6, benefit with lower payment standard (A2 - no shelter). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 0 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Family of 2, no shelter (A2) + # Payment standard: ~$176 + # Countable income: $0 + # Benefit: $176 + az_tanf: 176 + +- name: Case 7, eligible but zero benefit. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 0 # A2 lower standard + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $500 - $90 = $410, * 0.70 = $287 + # Payment standard (A2 for family of 2): ~$176 + # $287 > $176 - income exceeds payment standard + # Benefit: max($176 - $287, 0) = $0 + az_tanf: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml new file mode 100644 index 00000000000..7281addbfdf --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml @@ -0,0 +1,116 @@ +# Unit tests for Arizona TANF countable earned income at SPMUnit level +# Sums person-level earned income after disregards, minus dependent care deduction +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, no earned income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 0 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_countable_earned_income: 0 + +- name: Case 2, single earner. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Person1: $500 - $90 flat = $410, * 0.70 = $287 + # No dependent care deduction + az_tanf_countable_earned_income: 287 + +- name: Case 3, two earners. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + person2: + age: 28 + employment_income: 4_800 # $400/month annual + person3: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Person1: $500 - $90 = $410, * 0.70 = $287 + # Person2: $400 - $90 = $310, * 0.70 = $217 + # Total: $287 + $217 = $504 + az_tanf_countable_earned_income: 504 + +- name: Case 4, single earner with dependent care. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Person1: $500 - $90 = $410, * 0.70 = $287 + # Dependent care: min($300, $200) = $200 (child under 2) + # Countable earned: $287 - $200 = $87 + az_tanf_countable_earned_income: 87 + +- name: Case 5, earned income less than dependent care deduction. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 1_200 # $100/month annual + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Person1: $100 - $90 = $10, * 0.70 = $7 + # Dependent care: min($300, $200) = $200 + # Countable earned: max($7 - $200, 0) = $0 + az_tanf_countable_earned_income: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml new file mode 100644 index 00000000000..031896fa440 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml @@ -0,0 +1,116 @@ +# Unit tests for Arizona TANF countable income +# Combines countable earned income + gross unearned income +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, no income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 0 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_countable_income: 0 + +- name: Case 2, earned income only. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $287 (after disregards) + # Unearned: $0 + # Total: $287 + az_tanf_countable_income: 287 + +- name: Case 3, unearned income only. + period: 2024-01 + input: + people: + person1: + age: 30 + child_support_received: 2_400 # $200/month annual unearned + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $0 + # Unearned: $200 (no disregard on unearned) + # Total: $200 + az_tanf_countable_income: 200 + +- name: Case 4, mixed earned and unearned income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + child_support_received: 1_200 # $100/month annual unearned + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $287 (after disregards) + # Unearned: $100 (no disregard) + # Total: $387 + az_tanf_countable_income: 387 + +- name: Case 5, mixed income with dependent care. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + child_support_received: 1_200 # $100/month annual unearned + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Earned after disregards: $287 + # Dependent care deduction: $200 (child under 2) + # Countable earned: $287 - $200 = $87 + # Unearned: $100 + # Total: $187 + az_tanf_countable_income: 187 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml new file mode 100644 index 00000000000..7f0e54be69c --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml @@ -0,0 +1,139 @@ +# Unit tests for Arizona TANF dependent care deduction +# Child under 2: $200/month max, Child 2+: $175/month max, Disabled adult: $175/month max +# Deduction capped at actual care expenses +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html + +- name: Case 1, no childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 0 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_dependent_care_deduction: 0 + +- name: Case 2, child under 2 with expenses exceeding max. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child under 2: max $200/month + # Expenses ($300/mo) > max ($200), so deduction = $200 + az_tanf_dependent_care_deduction: 200 + +- name: Case 3, child age 2+ with expenses exceeding max. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 4 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child age 2+: max $175/month + # Expenses ($300/mo) > max ($175), so deduction = $175 + az_tanf_dependent_care_deduction: 175 + +- name: Case 4, expenses less than max. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 1_800 # $150/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child under 2: max $200/month + # Expenses ($150/mo) < max ($200), so deduction = $150 + az_tanf_dependent_care_deduction: 150 + +- name: Case 5, two children with combined deduction. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_child: true + person3: + age: 4 + is_child: true + spm_units: + spm_unit: + members: [person1, person2, person3] + childcare_expenses: 6_000 # $500/month annual + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Child1 (under 2): max $200 + # Child2 (age 2+): max $175 + # Total max: $375 + # Expenses ($500/mo) > max ($375), so deduction = $375 + az_tanf_dependent_care_deduction: 375 + +- name: Case 6, disabled adult care. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 65 + is_disabled: true + spm_units: + spm_unit: + members: [person1, person2] + care_expenses: 2_400 # $200/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Disabled adult: max $175/month + # Expenses ($200/mo) > max ($175), so deduction = $175 + az_tanf_dependent_care_deduction: 175 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml deleted file mode 100644 index 56ad0426639..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income.yaml +++ /dev/null @@ -1,120 +0,0 @@ -- name: Arizona has an earned income disregard of 4_440 under its cash assistance program - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - earned_income: 7_500 - person2: - earned_income: 7_500 - spm_units: - spm_unit: - members: [person1, person2] - az_hhs_tanf_earned_income_care_expense_disregard: 370 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_tanf_earned_income: 442 - -- name: Arizona has an earned income disregard of 2_100 under its cash assistance program - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - earned_income: 7_500 - person2: - earned_income: 7_500 - spm_units: - spm_unit: - members: [person1, person2] - az_hhs_tanf_earned_income_care_expense_disregard: 175 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_tanf_earned_income: 637 - -- name: Arizona has an earned income disregard of 2_100 under its cash assistance program (with little earned income) - period: 2023-01 - absolute_error_margin: 0.01 - input: - people: - person1: - earned_income: 500 - person2: - earned_income: 500 - spm_units: - spm_unit: - members: [person1, person2] - az_hhs_tanf_earned_income_care_expense_disregard: 175 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_tanf_earned_income: 0 - -- name: Arizona has an earned income disregard of 4_440 under its cash assistance program (yearly aggregated) - period: 2023 - absolute_error_margin: 0.01 - input: - people: - person1: - earned_income: 7_500 - person2: - earned_income: 7_500 - spm_units: - spm_unit: - members: [person1, person2] - az_hhs_tanf_earned_income_care_expense_disregard: 4_440 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_tanf_earned_income: 5_304 - -- name: Arizona has an earned income disregard of 2_100 under its cash assistance program (yearly aggregated) - period: 2023 - absolute_error_margin: 0.01 - input: - people: - person1: - earned_income: 7_500 - person2: - earned_income: 7_500 - spm_units: - spm_unit: - members: [person1, person2] - az_hhs_tanf_earned_income_care_expense_disregard: 2_100 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_tanf_earned_income: 7_644 - -- name: Arizona has an earned income disregard of 2_100 under its cash assistance program (with little earned income) (yearly aggregated) - period: 2023 - absolute_error_margin: 0.01 - input: - people: - person1: - earned_income: 500 - person2: - earned_income: 500 - spm_units: - spm_unit: - members: [person1, person2] - az_hhs_tanf_earned_income_care_expense_disregard: 2_100 - households: - household: - members: [person1, person2] - state_code: AZ - output: - az_tanf_earned_income: 0 - diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml new file mode 100644 index 00000000000..8d42fa45206 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml @@ -0,0 +1,96 @@ +# Unit tests for Arizona TANF earned income after disregard per person +# $90 flat disregard, then 30% percentage disregard +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, no earned income. + period: 2024-01 + input: + people: + person1: + employment_income: 0 + households: + household: + members: [person1] + state_code: AZ + output: + az_tanf_earned_income_after_disregard_person: [0] + +- name: Case 2, $500 monthly earned income. + period: 2024-01 + input: + people: + person1: + employment_income: 6_000 # $500/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $500 + # After $90 flat: $500 - $90 = $410 + # After 30% disregard: $410 * 0.70 = $287 + az_tanf_earned_income_after_disregard_person: [287] + +- name: Case 3, $400 monthly earned income. + period: 2024-01 + input: + people: + person1: + employment_income: 4_800 # $400/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $400 + # After $90 flat: $400 - $90 = $310 + # After 30% disregard: $310 * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [217] + +- name: Case 4, earned income below $90 flat disregard. + period: 2024-01 + input: + people: + person1: + employment_income: 600 # $50/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $50 + # After $90 flat: max($50 - $90, 0) = $0 + # After 30% disregard: $0 * 0.70 = $0 + az_tanf_earned_income_after_disregard_person: [0] + +- name: Case 5, earned income exactly $90. + period: 2024-01 + input: + people: + person1: + employment_income: 1_080 # $90/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $90 + # After $90 flat: $90 - $90 = $0 + # After 30% disregard: $0 + az_tanf_earned_income_after_disregard_person: [0] + +- name: Case 6, higher earned income. + period: 2024-01 + input: + people: + person1: + employment_income: 12_000 # $1,000/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $1,000 + # After $90 flat: $1,000 - $90 = $910 + # After 30% disregard: $910 * 0.70 = $637 + az_tanf_earned_income_after_disregard_person: [637] diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml new file mode 100644 index 00000000000..05f79d75efb --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml @@ -0,0 +1,178 @@ +# Unit tests for Arizona TANF eligibility +# Requires: demographic eligibility, immigration eligibility, income eligibility, resource eligibility +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, eligible family with minor child. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_eligible: true + +- name: Case 2, ineligible due to no minor child. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_citizen: true + spm_units: + spm_unit: + members: [person1] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1] + households: + household: + members: [person1] + state_code: AZ + output: + # No minor child (single adult) - fails demographic eligibility + az_tanf_eligible: false + +- name: Case 3, ineligible due to high income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 24_000 # $2,000/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # High income fails income test + # $2,000 - $90 = $1,910, * 0.70 = $1,337 countable + # Payment standard (A1 for 2): ~$276 + # $1,337 > $276 - fails income eligibility + az_tanf_eligible: false + +- name: Case 4, ineligible due to high assets. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $3,000 > $2,000 resource limit + az_tanf_eligible: false + +- name: Case 5, eligible pregnant woman. + period: 2024-01 + input: + people: + person1: + age: 25 + employment_income: 0 + is_tax_unit_head: true + is_citizen: true + is_pregnant: true + spm_units: + spm_unit: + members: [person1] + spm_unit_assets: 500 + housing_cost: 400 + tax_units: + tax_unit: + members: [person1] + households: + household: + members: [person1] + state_code: AZ + output: + # Pregnant woman is demographically eligible + az_tanf_eligible: true + +- name: Case 6, eligible family at income threshold. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 3_600 # $300/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + person3: + age: 3 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_500 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Family of 3 with low income + # Countable income: ($300 - $90) * 0.70 = $147 + # Payment standard (A1): ~$347 + # $147 < $347 - eligible + az_tanf_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml new file mode 100644 index 00000000000..a4904f58748 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml @@ -0,0 +1,109 @@ +# Unit tests for Arizona TANF 1992 FPG baseline +# Arizona uses 1992 FPG values for payment standard calculations +# 1992 FPG (CONTIGUOUS_US): first_person = $6,810, additional = $2,380 +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, family of 1. + period: 2024 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + households: + household: + members: [person1] + state_code: AZ + output: + # 1 person: $6,810 + az_tanf_fpg_baseline: 6_810 + +- name: Case 2, family of 2. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # 2 persons: $6,810 + $2,380 = $9,190 + az_tanf_fpg_baseline: 9_190 + +- name: Case 3, family of 3. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # 3 persons: $6,810 + 2*$2,380 = $11,570 + az_tanf_fpg_baseline: 11_570 + +- name: Case 4, family of 4. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + person4: + age: 1 + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + households: + household: + members: [person1, person2, person3, person4] + state_code: AZ + output: + # 4 persons: $6,810 + 3*$2,380 = $13,950 + az_tanf_fpg_baseline: 13_950 + +- name: Case 5, family of 5. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 28 + person3: + age: 10 + person4: + age: 8 + person5: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5] + households: + household: + members: [person1, person2, person3, person4, person5] + state_code: AZ + output: + # 5 persons: $6,810 + 4*$2,380 = $16,330 + az_tanf_fpg_baseline: 16_330 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml new file mode 100644 index 00000000000..154e9327f08 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml @@ -0,0 +1,78 @@ +# Unit tests for Arizona TANF FPG rate (needy family test) +# Parents: 100% FPG, Non-parent relatives: 130% FPG +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, parent caregiver. + period: 2024 + input: + people: + person1: + age: 30 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Parent head gets 100% FPG rate + az_tanf_fpg_rate: 1 + +- name: Case 2, non-parent relative caregiver. + period: 2024 + input: + people: + person1: + age: 50 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: false + person2: + age: 10 + spm_units: + spm_unit: + members: [person1, person2] + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Non-parent relative gets 130% FPG rate + az_tanf_fpg_rate: 1.3 + +- name: Case 3, two parents. + period: 2024 + input: + people: + person1: + age: 35 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 33 + is_parent_of_filer_or_spouse: true + person3: + age: 8 + spm_units: + spm_unit: + members: [person1, person2, person3] + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Has parent head, gets 100% FPG rate + az_tanf_fpg_rate: 1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml new file mode 100644 index 00000000000..fdc1bc015eb --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml @@ -0,0 +1,149 @@ +# Unit tests for Arizona TANF income eligibility +# Must pass both: (1) needy family test (income <= FPG rate * current FPG) +# (2) payment standard test (income <= payment standard) +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, no income eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Zero income passes both tests + az_tanf_income_eligible: true + +- name: Case 2, low income eligible with shelter. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 3_600 # $300/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $300 - $90 = $210, * 0.70 = $147 + # Payment standard (A1 for family of 2): ~$276 + # 2024 monthly FPG for 2: ~$1,703 (100% FPG for parent) + # $147 < $276 (payment standard test passes) + # $147 < $1,703 (needy family test passes) + az_tanf_income_eligible: true + +- name: Case 3, income exceeds payment standard. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 9_600 # $800/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $800 - $90 = $710, * 0.70 = $497 + # Payment standard (A1 for family of 2): ~$276 + # $497 > $276 (payment standard test FAILS) + az_tanf_income_eligible: false + +- name: Case 4, low income without shelter eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 1_800 # $150/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 0 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $150 - $90 = $60, * 0.70 = $42 + # Payment standard (A2 for family of 2): ~$176 + # $42 < $176 (passes both tests) + az_tanf_income_eligible: true + +- name: Case 5, larger family with unearned income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income: 3_600 # $300/month annual + child_support_received: 600 # $50/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Countable earned: $300 - $90 = $210, * 0.70 = $147 + # Unearned: $50 + # Total countable: $197 + # Payment standard (A1 for family of 3): ~$347 + # $197 < $347 (passes) + az_tanf_income_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml new file mode 100644 index 00000000000..4db65ea7147 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml @@ -0,0 +1,162 @@ +# Unit tests for Arizona TANF payment standard +# A1 (high/with shelter): 36% of 1992 FPG monthly baseline +# A2 (low/without shelter): 23% of 1992 FPG monthly baseline +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html + +- name: Case 1, family of 2 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 # $500/month rent + households: + household: + members: [person1, person2] + state_code: AZ + output: + # 1992 FPG for 2: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A1 rate: 36% + # Payment standard: $765.83 * 0.36 = $275.70 + az_tanf_payment_standard: 276 + +- name: Case 2, family of 2 without shelter costs (A2). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 0 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # 1992 FPG for 2: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A2 rate: 23% + # Payment standard: $765.83 * 0.23 = $176.14 + az_tanf_payment_standard: 176 + +- name: Case 3, family of 3 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + housing_cost: 600 + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # 1992 FPG for 3: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A1 rate: 36% + # Payment standard: $964.17 * 0.36 = $347.10 + az_tanf_payment_standard: 347 + +- name: Case 4, family of 3 without shelter costs (A2). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + housing_cost: 0 + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # 1992 FPG for 3: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A2 rate: 23% + # Payment standard: $964.17 * 0.23 = $221.76 + az_tanf_payment_standard: 222 + +- name: Case 5, family of 4 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + person4: + age: 1 + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + housing_cost: 700 + households: + household: + members: [person1, person2, person3, person4] + state_code: AZ + output: + # 1992 FPG for 4: $13,950 annual + # Monthly: $13,950 / 12 = $1,162.50 + # A1 rate: 36% + # Payment standard: $1,162.50 * 0.36 = $418.50 + az_tanf_payment_standard: 419 + +- name: Case 6, family of 5 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 28 + person3: + age: 10 + person4: + age: 8 + person5: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5] + housing_cost: 800 + households: + household: + members: [person1, person2, person3, person4, person5] + state_code: AZ + output: + # 1992 FPG for 5: $16,330 annual + # Monthly: $16,330 / 12 = $1,360.83 + # A1 rate: 36% + # Payment standard: $1,360.83 * 0.36 = $489.90 + az_tanf_payment_standard: 490 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml new file mode 100644 index 00000000000..d3c7f755946 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml @@ -0,0 +1,102 @@ +# Unit tests for Arizona TANF resources eligibility +# Resource limit: $2,000 +# Reference: https://az.db101.org/az/programs/income_support/tanf/program2.htm + +- name: Case 1, no assets. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 0 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_resources_eligible: true + +- name: Case 2, assets below limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_500 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $1,500 < $2,000 limit + az_tanf_resources_eligible: true + +- name: Case 3, assets at limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_000 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $2,000 = $2,000 limit (eligible at limit) + az_tanf_resources_eligible: true + +- name: Case 4, assets exceed limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_500 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $2,500 > $2,000 limit + az_tanf_resources_eligible: false + +- name: Case 5, assets significantly exceed limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 5_000 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $5,000 > $2,000 limit + az_tanf_resources_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml deleted file mode 100644 index bf3e5afad6e..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.yaml +++ /dev/null @@ -1,31 +0,0 @@ -- name: The eligible family without shelter cost receives cash assistance under low payment standard - period: 2024-01 - absolute_error_margin: 3 - #have rounding errors with the 23% when calculating payment standard - input: - az_payment_standard_threshold: 218 - az_tanf_earned_income: 147 - az_hhs_tanf_eligible: true - output: - az_cash_assistance: 71 - -- name: The eligible family without shelter cost receives cash assistance under low payment standard - period: 2023-01 - absolute_error_margin: 3 - input: - az_payment_standard_threshold: 175 - az_tanf_earned_income: 147 - az_hhs_tanf_eligible: true - output: - az_cash_assistance: 28 - -- name: The family earns above payment standard threshold, therefore gets no cash assistance - period: 2023-01 - absolute_error_margin: 3 - input: - az_payment_standard_threshold: 175 - az_tanf_earned_income: 1_000 - az_hhs_tanf_eligible: true - output: - az_cash_assistance: 0 - diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml deleted file mode 100644 index 83d0963a046..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- name: The 1992 fpg baseline for a family of 1 - period: 2024 - absolute_error_margin: 1 - input: - spm_unit_size: 1 - state_code: AZ - output: - az_fpg_baseline: 6_810 - -- name: The 1992 fpg baseline for a family of 4 - period: 2021 - absolute_error_margin: 1 - input: - spm_unit_size: 4 - state_code: AZ - output: - az_fpg_baseline: 13_950 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml deleted file mode 100644 index 513371814ff..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.yaml +++ /dev/null @@ -1,31 +0,0 @@ -- name: Head of tax unit is a parent - period: 2023 - input: - people: - person1: - is_tax_unit_head: true - is_parent_of_filer_or_spouse: true - person2: - is_tax_unit_head: false - is_parent_of_filer_or_spouse: true - spm_units: - spm_unit: - members: [person1, person2] - output: - az_fpg_rate: 1 - -- name: Head of tax unit is not a parent - period: 2023 - input: - people: - person1: - is_tax_unit_head: true - is_parent_of_filer_or_spouse: false - person2: - is_tax_unit_head: false - is_parent_of_filer_or_spouse: false - spm_units: - spm_unit: - members: [person1, person2] - output: - az_fpg_rate: 1.3 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml deleted file mode 100644 index eeefdf3e49f..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.yaml +++ /dev/null @@ -1,35 +0,0 @@ -- name: The family meets both payment standard and fpg standard restrictions - period: 2024-01 - absolute_error_margin: 0.01 - input: - spm_unit_size: 3 - az_tanf_earned_income: 175 - az_payment_standard_threshold: 278 - az_fpg_rate: 1 - state_code: AZ - output: - az_hhs_tanf_eligible: true - -- name: The family earning is above payment standard - period: 2023-01 - absolute_error_margin: 0.01 - input: - spm_unit_size: 3 - az_tanf_earned_income: 175 - az_payment_standard_threshold: 150 - az_fpg_rate: 1 - state_code: AZ - output: - az_hhs_tanf_eligible: false - -- name: The family earning is above payment standard - period: 2023-01 - absolute_error_margin: 0.01 - input: - spm_unit_size: 3 - az_tanf_earned_income: 175 - az_payment_standard_threshold: 278 - az_fpg_rate: 1.3 - state_code: AZ - output: - az_hhs_tanf_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml deleted file mode 100644 index cf5b7248fda..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.yaml +++ /dev/null @@ -1,41 +0,0 @@ -- name: The family of 3 do not spend shelter cost (under the latest standard) - period: 2024-01 - absolute_error_margin: 5 - #have rounding errors with the 23% when calculating payment standard - input: - az_fpg_baseline: 11_570 - housing_cost: 0 - state_code: AZ - output: - az_payment_standard_threshold: 218 - -- name: The family of 3 do not spend shelter cost (under the previous standard) - period: 2023-01 - absolute_error_margin: 5 - #have rounding errors with the 23% when calculating payment standard - input: - az_fpg_baseline: 11_570 - housing_cost: 0 - state_code: AZ - output: - az_payment_standard_threshold: 175 - -- name: The family of 3 spend shelter cost (under the latest standard) - period: 2024-01 - absolute_error_margin: 1 - input: - az_fpg_baseline: 11_570 - housing_cost: 100 - state_code: AZ - output: - az_payment_standard_threshold: 347 - -- name: The family of 3 spend shelter cost (under the previous standard) - period: 2023-01 - absolute_error_margin: 1 - input: - az_fpg_baseline: 11_570 - housing_cost: 100 - state_code: AZ - output: - az_payment_standard_threshold: 278 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml deleted file mode 100644 index 265ee093ba2..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml +++ /dev/null @@ -1,35 +0,0 @@ -- name: Eligible non-student - period: 2023 - input: - state_code: AZ - age: 17 - is_full_time_student: false - output: - az_tanf_eligible_child: true - -- name: Not eligible non-student - period: 2023 - input: - state_code: AZ - age: 18 - is_full_time_student: false - output: - az_tanf_eligible_child: false - -- name: Eligible student - period: 2023 - input: - state_code: AZ - age: 18 - is_full_time_student: true - output: - az_tanf_eligible_child: true - -- name: Not eligible student - period: 2023 - input: - state_code: AZ - age: 19 - is_full_time_student: true - output: - az_tanf_eligible_child: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml new file mode 100644 index 00000000000..0b012c06bfc --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml @@ -0,0 +1,450 @@ +# Integration tests for Arizona TANF - full pipeline testing +# Tests realistic family scenarios with complete eligibility and benefit calculations +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines +# +# Key Arizona TANF rules: +# - Earned income disregard: $90 flat + 30% of remainder +# - Payment standard: A1 (36% of 1992 FPG) with shelter, A2 (23%) without +# - 1992 FPG (CONTIGUOUS_US): first_person = $6,810, additional = $2,380 +# - Resource limit: $2,000 +# - Needy family test: FPG rate * current FPG (100% for parents, 130% for non-parent relatives) + +- name: Scenario 1, single parent with 2 children, no income - full benefit. + # Family of 3, no income, receives full A1 payment standard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + person3: + age: 3 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_000 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation + az_tanf_earned_income_after_disregard_person: [0, 0, 0] + az_tanf_countable_earned_income: 0 + az_tanf_countable_income: 0 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 3, 1992 FPG: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A1 rate (with shelter): 36% + # Payment standard: $964.17 * 0.36 = $347.10 + az_tanf_payment_standard: 347 + # Benefit: $347 - $0 = $347 + az_tanf: 347 + +- name: Scenario 2, family of 3 with $500 monthly earnings. + # Standard earned income calculation with $90 flat + 30% disregard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 28 + employment_income: 6_000 # $500/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 4 + is_citizen: true + person3: + age: 2 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 500 + housing_cost: 550 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation + # Person1: $500 - $90 flat = $410, * 0.70 = $287 + az_tanf_earned_income_after_disregard_person: [287, 0, 0] + az_tanf_countable_earned_income: 287 + az_tanf_countable_income: 287 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Payment standard (family of 3, A1): $347 + az_tanf_payment_standard: 347 + # Benefit: $347 - $287 = $60 + az_tanf: 60 + +- name: Scenario 3, single parent with one child, with childcare. + # Family of 2, earned income with dependent care deduction + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 35 + employment_income: 6_000 # $500/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 1 + is_citizen: true + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 800 + housing_cost: 400 + childcare_expenses: 3_600 # $300/month annual + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Income calculation + # Person1: $500 - $90 = $410, * 0.70 = $287 + az_tanf_earned_income_after_disregard_person: [287, 0] + # Dependent care for child under 2: min($300, $200) = $200 + az_tanf_dependent_care_deduction: 200 + # Countable earned: $287 - $200 = $87 + az_tanf_countable_earned_income: 87 + az_tanf_countable_income: 87 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 2, 1992 FPG: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A1 rate: 36% + # Payment standard: $765.83 * 0.36 = $275.70 ~ $276 + az_tanf_payment_standard: 276 + # Benefit: $276 - $87 = $189 + az_tanf: 189 + +- name: Scenario 4, family ineligible due to income exceeding payment standard. + # Gross income passes needy family test, but countable exceeds payment standard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 32 + employment_income: 9_600 # $800/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 7 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_200 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Income calculation + # Person1: $800 - $90 = $710, * 0.70 = $497 + az_tanf_earned_income_after_disregard_person: [497, 0] + az_tanf_countable_earned_income: 497 + az_tanf_countable_income: 497 + # Payment standard (A1 for family of 2): ~$276 + az_tanf_payment_standard: 276 + # $497 > $276 - fails payment standard test + az_tanf_income_eligible: false + az_tanf_eligible: false + az_tanf: 0 + +- name: Scenario 5, ineligible due to excess resources. + # Income eligible but assets exceed $2,000 limit + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 # Exceeds $2,000 limit + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Resources exceed limit + az_tanf_resources_eligible: false + az_tanf_eligible: false + az_tanf: 0 + +- name: Scenario 6, combined earned and unearned income. + # Tests handling of both income types + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 29 + employment_income: 4_800 # $400/month annual + child_support_received: 1_200 # $100/month annual unearned + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 4 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 450 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Income calculation + # Person1 earned: $400 - $90 = $310, * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [217, 0] + az_tanf_countable_earned_income: 217 + # Unearned (child support): $100 (no disregard) + # Total countable: $217 + $100 = $317 + az_tanf_countable_income: 317 + # Eligibility + az_tanf_resources_eligible: true + # Payment standard (A1 for family of 2): ~$276 + az_tanf_payment_standard: 276 + # $317 > $276 - fails payment standard test + az_tanf_income_eligible: false + az_tanf_eligible: false + az_tanf: 0 + +- name: Scenario 7, large family of 5 with partial benefit. + # Tests larger family size payment standard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 38 + employment_income: 4_800 # $400/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 36 + is_parent_of_filer_or_spouse: true + is_citizen: true + person3: + age: 14 + is_citizen: true + person4: + age: 10 + is_citizen: true + person5: + age: 5 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5] + spm_unit_assets: 1_500 + housing_cost: 800 + tax_units: + tax_unit: + members: [person1, person2, person3, person4, person5] + households: + household: + members: [person1, person2, person3, person4, person5] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, false, true, true, true] + # Income calculation + # Person1: $400 - $90 = $310, * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [217, 0, 0, 0, 0] + az_tanf_countable_earned_income: 217 + az_tanf_countable_income: 217 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 5, 1992 FPG: $16,330 annual + # Monthly: $16,330 / 12 = $1,360.83 + # A1 rate: 36% + # Payment standard: $1,360.83 * 0.36 = $489.90 ~ $490 + az_tanf_payment_standard: 490 + # Benefit: $490 - $217 = $273 + az_tanf: 273 + +- name: Scenario 8, two working adults with childcare. + # Multi-earner household with dependent care deduction + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 6_000 # $500/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 28 + employment_income: 4_800 # $400/month annual + is_parent_of_filer_or_spouse: true + is_citizen: true + person3: + age: 1 + is_citizen: true + is_child: true + person4: + age: 4 + is_citizen: true + is_child: true + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + spm_unit_assets: 1_200 + housing_cost: 700 + childcare_expenses: 6_000 # $500/month annual + tax_units: + tax_unit: + members: [person1, person2, person3, person4] + households: + household: + members: [person1, person2, person3, person4] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, false, true, true] + # Income calculation + # Person1: $500 - $90 = $410, * 0.70 = $287 + # Person2: $400 - $90 = $310, * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [287, 217, 0, 0] + # Total after disregards: $287 + $217 = $504 + # Dependent care: child under 2 ($200) + child 2+ ($175) = $375 + az_tanf_dependent_care_deduction: 375 + # Countable earned: $504 - $375 = $129 + az_tanf_countable_earned_income: 129 + az_tanf_countable_income: 129 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 4, 1992 FPG: $13,950 annual + # Monthly: $13,950 / 12 = $1,162.50 + # A1 rate: 36% + # Payment standard: $1,162.50 * 0.36 = $418.50 ~ $419 + az_tanf_payment_standard: 419 + # Benefit: $419 - $129 = $290 + az_tanf: 290 + +- name: Scenario 9, family without shelter costs (A2 payment standard). + # Tests lower A2 payment standard without shelter costs + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income: 1_800 # $150/month annual + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + is_citizen: true + person2: + age: 5 + is_citizen: true + person3: + age: 3 + is_citizen: true + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 500 + housing_cost: 0 # No shelter costs + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation + # Person1: $150 - $90 = $60, * 0.70 = $42 + az_tanf_earned_income_after_disregard_person: [42, 0, 0] + az_tanf_countable_earned_income: 42 + az_tanf_countable_income: 42 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 3, 1992 FPG: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A2 rate (no shelter): 23% + # Payment standard: $964.17 * 0.23 = $221.76 ~ $222 + az_tanf_payment_standard: 222 + # Benefit: $222 - $42 = $180 + az_tanf: 180 diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py deleted file mode 100644 index f3390ec8758..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/az_hhs_tanf_earned_income_care_expense_disregard.py +++ /dev/null @@ -1,33 +0,0 @@ -from policyengine_us.model_api import * - - -class az_hhs_tanf_earned_income_care_expense_disregard(Variable): - value_type = float - entity = SPMUnit - label = "Arizona Cash Assistance care expense earned income disregard" - definition_period = MONTH - defined_for = StateCode.AZ - - def formula(spm_unit, period, parameters): - p = parameters( - period - ).gov.states.az.hhs.tanf.eligibility.income.earned.care_expenses - # Get the age of the child(children) and the disabled adult(s) - person = spm_unit.members - age = person("age", period) * MONTHS_IN_YEAR - # Get the childcare and disabled adult care expenses - care_expenses = add( - spm_unit, period, ["childcare_expenses", "care_expenses"] - ) - # Determine the total eligible disregard - # The eligibility reuquirements consider whether children or disabled adults - is_child = person("az_tanf_eligible_child", period) - child = person("is_child", period) - disabled_adult = person("is_disabled", period) & ~child - # Calculate eligible child disregard - child_amount = p.child_amounts.calc(age) * is_child - # Calculate eligible disabled adult disregard - adult_amount = disabled_adult * p.adult - total_amount = spm_unit.sum(child_amount + adult_amount) - # The disregard is capped at the expenses - return min_(care_expenses, total_amount) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py new file mode 100644 index 00000000000..84121fc398e --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py @@ -0,0 +1,16 @@ +from policyengine_us.model_api import * + + +class az_tanf(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF" + unit = USD + definition_period = MONTH + reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + defined_for = "az_tanf_eligible" + + def formula(spm_unit, period, parameters): + payment_standard = spm_unit("az_tanf_payment_standard", period) + countable_income = spm_unit("az_tanf_countable_income", period) + return max_(payment_standard - countable_income, 0) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py deleted file mode 100644 index 7b911b56616..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf_earned_income.py +++ /dev/null @@ -1,29 +0,0 @@ -from policyengine_us.model_api import * - - -class az_tanf_earned_income(Variable): - value_type = float - entity = SPMUnit - label = "Earned income for the Arizona Cash Assistance" - definition_period = MONTH - defined_for = StateCode.AZ - - def formula(spm_unit, period, parameters): - # Earned income of the spm unit - monthly_income = add(spm_unit, period, ["earned_income"]) - # Determine the expense discount - p = parameters(period).gov.states.az.hhs.tanf.eligibility.income.earned - # Yearly subtracted income disregard - # Income after subtracting constant value and certain percentage - income_after_flat_disregard = max_(monthly_income - p.flat, 0) - income_percentage_disregard = income_after_flat_disregard * ( - 1 - p.percentage - ) - # Calculate countable earned income by further subtracting earned income disregard - earned_income_care_expense_disregard = spm_unit( - "az_hhs_tanf_earned_income_care_expense_disregard", period - ) - return max_( - income_percentage_disregard - earned_income_care_expense_disregard, - 0, - ) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py deleted file mode 100644 index fa7d5fd2c62..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_cash_assistance.py +++ /dev/null @@ -1,23 +0,0 @@ -from policyengine_us.model_api import * - - -class az_cash_assistance(Variable): - value_type = float - entity = SPMUnit - label = "Arizona Cash Assistance Payment" - definition_period = MONTH - reference = ( - "https://az.db101.org/az/programs/income_support/tanf/program2.htm" - ) - defined_for = "az_hhs_tanf_eligible" - - def formula(spm_unit, period, parameters): - payment_standard_threshold = spm_unit( - "az_payment_standard_threshold", period - ) - monthly_countable_earned_income = spm_unit( - "az_tanf_earned_income", period - ) - return max_( - payment_standard_threshold - monthly_countable_earned_income, 0 - ) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py deleted file mode 100644 index 6280637d0c8..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_rate.py +++ /dev/null @@ -1,17 +0,0 @@ -from policyengine_us.model_api import * - - -class az_fpg_rate(Variable): - value_type = float - entity = SPMUnit - label = "Needy family Federal Poverty Guideline Percentage Limit" - definition_period = YEAR - - def formula(spm_unit, period, parameters): - # Determine whether the head-of-household is a non-parent relative - p = parameters(period).gov.states.az.hhs.tanf.eligibility.rate - person = spm_unit.members - tax_unit_head = person("is_tax_unit_head", period) - parent = person("is_parent_of_filer_or_spouse", period) - eligible_parent_present = spm_unit.any(tax_unit_head & parent) - return where(eligible_parent_present, p.base, p.non_parent) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py deleted file mode 100644 index aa2af5e421d..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_hhs_tanf_eligible.py +++ /dev/null @@ -1,31 +0,0 @@ -from policyengine_us.model_api import * - - -class az_hhs_tanf_eligible(Variable): - value_type = bool - entity = SPMUnit - label = "Eligible for the Arizona Cash Assistance" - definition_period = MONTH - reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" - defined_for = StateCode.AZ - - def formula(spm_unit, period, parameters): - monthly_fpg = spm_unit("spm_unit_fpg", period) - monthly_countable_earned_income = spm_unit( - "az_tanf_earned_income", period - ) - payment_standard_threshold = spm_unit( - "az_payment_standard_threshold", period - ) - # Judge whether the unit is considered a needy family - # (countable income is below 100% of Federal Poverty Guideline) - fpg_rate = spm_unit("az_fpg_rate", period) - income_eligibility = ( - monthly_countable_earned_income <= fpg_rate * monthly_fpg - ) - # Judge whether the countable income exceed the Cash Assistance Payment Standard - payment_standard_eligibility = ( - monthly_countable_earned_income <= payment_standard_threshold - ) - # The family is eligible for the cash assistance only when the two criteria are met at the same time - return income_eligibility & payment_standard_eligibility diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py deleted file mode 100644 index 77933aa4bb0..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_payment_standard_threshold.py +++ /dev/null @@ -1,21 +0,0 @@ -from policyengine_us.model_api import * - - -class az_payment_standard_threshold(Variable): - value_type = float - entity = SPMUnit - label = "Arizona Cash Assistance Payment Standard" - definition_period = MONTH - reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" - defined_for = StateCode.AZ - - def formula(spm_unit, period, parameters): - monthly_fpg_baseline = spm_unit("az_fpg_baseline", period) - p = parameters( - period - ).gov.states.az.hhs.tanf.eligibility.payment_standard - high_threshold = p.high * monthly_fpg_baseline - low_threshold = p.low * monthly_fpg_baseline - shelter_cost = spm_unit("housing_cost", period) - - return where(shelter_cost > 0, high_threshold, low_threshold) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py new file mode 100644 index 00000000000..e664ce55429 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py @@ -0,0 +1,27 @@ +from policyengine_us.model_api import * + + +class az_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Eligible for Arizona TANF" + definition_period = MONTH + reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Use federal demographic eligibility (minor child or pregnant) + demographic_eligible = spm_unit("is_demographic_tanf_eligible", period) + # Must be US citizen or qualified alien + immigration_eligible = ( + add(spm_unit, period, ["is_citizen_or_legal_immigrant"]) > 0 + ) + income_eligible = spm_unit("az_tanf_income_eligible", period) + resources_eligible = spm_unit("az_tanf_resources_eligible", period) + + return ( + demographic_eligible + & immigration_eligible + & income_eligible + & resources_eligible + ) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py deleted file mode 100644 index 6b0793a094b..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py +++ /dev/null @@ -1,19 +0,0 @@ -from policyengine_us.model_api import * - - -class az_tanf_eligible_child(Variable): - value_type = bool - entity = Person - label = "Eligible child for the Arizona Cash Assistance" - definition_period = YEAR - defined_for = StateCode.AZ - - def formula(person, period, parameters): - # Get the age of the person - age = person("age", period) - # Determine whether they are a student - student = person("is_full_time_student", period) - # Determine the age thresholds - p = parameters(period).gov.states.az.hhs.tanf.eligibility.age_threshold - age_threshold = where(student, p.student, p.non_student) - return age < age_threshold diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py similarity index 63% rename from policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py rename to policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py index 89f37568862..d395da391e6 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_fpg_baseline.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py @@ -1,20 +1,23 @@ from policyengine_us.model_api import * -class az_fpg_baseline(Variable): +class az_tanf_fpg_baseline(Variable): value_type = float entity = SPMUnit - label = "Arizona Cash Assistance Payment Standard fpg Baseline" + label = "Arizona TANF payment standard FPG baseline" + unit = USD definition_period = YEAR reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): - intant_str = f"1992-01-01" + # Arizona uses 1992 FPG values for payment standard calculations + instant_str = "1992-01-01" household_size = spm_unit("spm_unit_size", period) - cap_household_size = max_(household_size, 0) state_group = spm_unit.household("state_group_str", period) - p_fpg = parameters(intant_str).gov.hhs.fpg + + p_fpg = parameters(instant_str).gov.hhs.fpg p1 = p_fpg.first_person[state_group] pn = p_fpg.additional_person[state_group] - return p1 + pn * (cap_household_size - 1) + + return p1 + pn * (household_size - 1) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py new file mode 100644 index 00000000000..95e2d4ecac8 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py @@ -0,0 +1,21 @@ +from policyengine_us.model_api import * + + +class az_tanf_fpg_rate(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF needy family FPG rate" + definition_period = YEAR + reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Non-parent relatives get 130% FPG; parents get 100% FPG + p = parameters(period).gov.states.az.hhs.tanf.eligibility.rate + + person = spm_unit.members + is_head = person("is_tax_unit_head", period) + is_parent = person("is_parent_of_filer_or_spouse", period) + has_parent_head = spm_unit.any(is_head & is_parent) + + return where(has_parent_head, p.base, p.non_parent) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py new file mode 100644 index 00000000000..625e4d8b01d --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py @@ -0,0 +1,24 @@ +from policyengine_us.model_api import * + + +class az_tanf_income_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Arizona TANF income eligible" + definition_period = MONTH + reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + countable_income = spm_unit("az_tanf_countable_income", period) + monthly_fpg = spm_unit("spm_unit_fpg", period) + payment_standard = spm_unit("az_tanf_payment_standard", period) + + # Test 1: Needy family test (income <= FPG rate * FPG) + fpg_rate = spm_unit("az_tanf_fpg_rate", period) + needy_family_test = countable_income <= fpg_rate * monthly_fpg + + # Test 2: Payment standard test (income <= payment standard) + payment_standard_test = countable_income <= payment_standard + + return needy_family_test & payment_standard_test diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py new file mode 100644 index 00000000000..4397df4d679 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * + + +class az_tanf_payment_standard(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF payment standard" + unit = USD + definition_period = MONTH + reference = ( + "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/" + "CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA" + ) + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Arizona uses monthly 1992 FPG baseline for payment standard + fpg_baseline = spm_unit("az_tanf_fpg_baseline", period) + monthly_fpg_baseline = fpg_baseline / MONTHS_IN_YEAR + + p = parameters( + period + ).gov.states.az.hhs.tanf.eligibility.payment_standard + + # A1 (high) if shelter costs > 0; A2 (low) otherwise + shelter_cost = spm_unit("housing_cost", period) + has_shelter_costs = shelter_cost > 0 + + high_threshold = p.high * monthly_fpg_baseline + low_threshold = p.low * monthly_fpg_baseline + + return where(has_shelter_costs, high_threshold, low_threshold) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py new file mode 100644 index 00000000000..d09e9d3c167 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class az_tanf_resources_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Arizona TANF resources eligible" + definition_period = MONTH + reference = ( + "https://az.db101.org/az/programs/income_support/tanf/program2.htm" + ) + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + p = parameters(period).gov.states.az.hhs.tanf.resources + resources = spm_unit("spm_unit_assets", period.this_year) + return resources <= p.limit diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py new file mode 100644 index 00000000000..cf6e11daeb8 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class az_tanf_countable_earned_income(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF countable earned income" + unit = USD + definition_period = MONTH + reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Sum person-level earned income after $90 flat and 30% disregards + after_disregards = add( + spm_unit, + period, + ["az_tanf_earned_income_after_disregard_person"], + ) + # Subtract dependent care deduction + care_deduction = spm_unit("az_tanf_dependent_care_deduction", period) + return max_(after_disregards - care_deduction, 0) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py new file mode 100644 index 00000000000..9a6fcdd1528 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py @@ -0,0 +1,13 @@ +from policyengine_us.model_api import * + + +class az_tanf_countable_income(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF countable income" + unit = USD + definition_period = MONTH + reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + defined_for = StateCode.AZ + + adds = ["az_tanf_countable_earned_income", "tanf_gross_unearned_income"] diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py new file mode 100644 index 00000000000..3037136d3ab --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py @@ -0,0 +1,38 @@ +from policyengine_us.model_api import * + + +class az_tanf_dependent_care_deduction(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF dependent care deduction" + unit = USD + definition_period = MONTH + reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + p = parameters( + period + ).gov.states.az.hhs.tanf.eligibility.income.earned.care_expenses + + person = spm_unit.members + age = person("age", period.this_year) + + # Actual care expenses (childcare + adult care) + care_expenses = add( + spm_unit, period, ["childcare_expenses", "care_expenses"] + ) + + # Calculate eligible deduction for children (based on age) + is_child = person("is_child", period) + child_amount = p.child_amounts.calc(age) * is_child + + # Calculate eligible deduction for disabled adults + disabled_adult = person("is_disabled", period.this_year) & ~is_child + adult_amount = disabled_adult * p.adult + + # Total eligible deduction + total_eligible = spm_unit.sum(child_amount + adult_amount) + + # Deduction is capped at actual care expenses + return min_(care_expenses, total_eligible) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py new file mode 100644 index 00000000000..49a00857ffd --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class az_tanf_earned_income_after_disregard_person(Variable): + value_type = float + entity = Person + label = "Arizona TANF earned income after disregard per person" + unit = USD + definition_period = MONTH + reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + defined_for = StateCode.AZ + + def formula(person, period, parameters): + # Step 1: Get person's gross earned income + gross_earned = person("tanf_gross_earned_income", period) + + # Step 2: Apply $90 flat disregard, then 30% percentage disregard + p = parameters(period).gov.states.az.hhs.tanf.eligibility.income.earned + after_flat = max_(gross_earned - p.flat, 0) + after_percentage = after_flat * (1 - p.percentage) + + return max_(after_percentage, 0) From ab3c3845aaab17e92a61f0b76ed3243c38ed64bd Mon Sep 17 00:00:00 2001 From: Ziming Date: Sun, 11 Jan 2026 13:03:22 -0500 Subject: [PATCH 3/6] pr fix --- .../tanf/eligibility/income/earned/care_expenses/adult.yaml | 2 +- .../income/earned/care_expenses/child_amounts.yaml | 2 +- .../states/az/hhs/tanf/eligibility/income/earned/flat.yaml | 2 +- .../az/hhs/tanf/eligibility/income/earned/percentage.yaml | 2 +- .../gov/states/az/hhs/tanf/eligibility/rate/base.yaml | 2 +- .../gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml | 2 +- .../parameters/gov/states/az/hhs/tanf/resources/limit.yaml | 4 ++-- .../gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml | 4 ++-- .../states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml index 69f60d01b72..eb5c6e2cd77 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml @@ -5,7 +5,7 @@ metadata: period: month label: Arizona TANF disabled adult dependent care deduction reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + - title: Arizona DES CNAP Manual FAA6.Dependent_Care_Amount_for_CA href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA values: diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml index f786662d33a..adf67c94562 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml @@ -7,7 +7,7 @@ metadata: amount_unit: currency-USD label: Arizona TANF child dependent care deduction reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + - title: Arizona DES CNAP Manual FAA6.Dependent_Care_Amount_for_CA href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA brackets: diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml index f77ef7b8ecd..75fb61023da 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml @@ -5,7 +5,7 @@ metadata: period: month label: Arizona TANF flat earned income disregard reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Earned Income Disregard href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA values: diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml index 33860dd9755..ccca278fcbc 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml @@ -5,7 +5,7 @@ metadata: period: month label: Arizona TANF earned income percentage disregard reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Earned Income Disregard href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA values: diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml index 409cae39165..05c47dea036 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml @@ -5,7 +5,7 @@ metadata: period: year label: Arizona TANF income limit rate reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Needy Family Test href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA values: diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml index ddfdfd64442..1d10ff5abab 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml @@ -5,7 +5,7 @@ metadata: period: year label: Arizona TANF non-parent income limit rate reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines + - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Non-Parent Relative Rate href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA values: diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml index 06a852e0aad..0dafe3f16f6 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml @@ -8,5 +8,5 @@ metadata: period: month label: Arizona TANF resource limit reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Eligibility - href: https://az.db101.org/az/programs/income_support/tanf/program2.htm + - title: Arizona DES CNAP Manual FAA5 - Resource Eligibility + href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/Resource_Eligibility.html diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml index fdc1bc015eb..752f1b9d4f8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml @@ -54,9 +54,9 @@ output: # Countable earned: $300 - $90 = $210, * 0.70 = $147 # Payment standard (A1 for family of 2): ~$276 - # 2024 monthly FPG for 2: ~$1,703 (100% FPG for parent) + # 2024 annual FPG for 2: ~$20,440 (100% FPG for parent) # $147 < $276 (payment standard test passes) - # $147 < $1,703 (needy family test passes) + # $147 < $20,440 (needy family test passes) az_tanf_income_eligible: true - name: Case 3, income exceeds payment standard. diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py index 625e4d8b01d..6ca967d484a 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py @@ -11,12 +11,12 @@ class az_tanf_income_eligible(Variable): def formula(spm_unit, period, parameters): countable_income = spm_unit("az_tanf_countable_income", period) - monthly_fpg = spm_unit("spm_unit_fpg", period) + fpg = spm_unit("spm_unit_fpg", period) payment_standard = spm_unit("az_tanf_payment_standard", period) # Test 1: Needy family test (income <= FPG rate * FPG) fpg_rate = spm_unit("az_tanf_fpg_rate", period) - needy_family_test = countable_income <= fpg_rate * monthly_fpg + needy_family_test = countable_income <= fpg_rate * fpg # Test 2: Payment standard test (income <= payment standard) payment_standard_test = countable_income <= payment_standard From 029851de50455a136092f4e6e1e73bdb6c6a730b Mon Sep 17 00:00:00 2001 From: Ziming Date: Sun, 11 Jan 2026 13:18:36 -0500 Subject: [PATCH 4/6] fix tests --- .../gov/states/az/hhs/tanf/az_tanf.yaml | 29 +--- .../tanf/az_tanf_countable_earned_income.yaml | 12 +- .../az/hhs/tanf/az_tanf_countable_income.yaml | 8 +- .../az_tanf_dependent_care_deduction.yaml | 24 +++- ..._earned_income_after_disregard_person.yaml | 12 +- .../states/az/hhs/tanf/az_tanf_eligible.yaml | 134 +++++++++++++++--- .../az/hhs/tanf/az_tanf_income_eligible.yaml | 10 +- .../gov/states/az/hhs/tanf/integration.yaml | 46 ++---- .../eligibility/az_tanf_income_eligible.py | 3 +- .../eligibility/az_tanf_payment_standard.py | 4 +- 10 files changed, 182 insertions(+), 100 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml index 2695ff60ae1..98831e2fe68 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml @@ -9,13 +9,11 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -42,13 +40,11 @@ people: person1: age: 30 - employment_income: 3_600 # $300/month annual + employment_income_before_lsr: 3_600 # $300/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -73,13 +69,11 @@ people: person1: age: 30 - employment_income: 24_000 # $2,000/month annual + employment_income_before_lsr: 24_000 # $2,000/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -103,16 +97,13 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true person3: age: 3 - is_citizen: true spm_units: spm_unit: members: [person1, person2, person3] @@ -139,14 +130,12 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 child_support_received: 1_200 # $100/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -172,13 +161,11 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -205,13 +192,11 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml index 7281addbfdf..a062258a746 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml @@ -8,7 +8,7 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 person2: age: 5 spm_units: @@ -27,7 +27,7 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual person2: age: 5 spm_units: @@ -48,10 +48,10 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual person2: age: 28 - employment_income: 4_800 # $400/month annual + employment_income_before_lsr: 4_800 # $400/month annual person3: age: 5 spm_units: @@ -73,7 +73,7 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual person2: age: 1 is_child: true @@ -97,7 +97,7 @@ people: person1: age: 30 - employment_income: 1_200 # $100/month annual + employment_income_before_lsr: 1_200 # $100/month annual person2: age: 1 is_child: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml index 031896fa440..2090267d4c6 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml @@ -8,7 +8,7 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 person2: age: 5 spm_units: @@ -27,7 +27,7 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual person2: age: 5 spm_units: @@ -71,7 +71,7 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual child_support_received: 1_200 # $100/month annual unearned person2: age: 5 @@ -94,7 +94,7 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual child_support_received: 1_200 # $100/month annual unearned person2: age: 1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml index 7f0e54be69c..4a0f383ab72 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml @@ -122,13 +122,13 @@ people: person1: age: 30 + pre_subsidy_care_expenses: 200 # $200/month person2: age: 65 is_disabled: true spm_units: spm_unit: members: [person1, person2] - care_expenses: 2_400 # $200/month annual households: household: members: [person1, person2] @@ -137,3 +137,25 @@ # Disabled adult: max $175/month # Expenses ($200/mo) > max ($175), so deduction = $175 az_tanf_dependent_care_deduction: 175 + +- name: Case 7, child exactly at age 2 boundary. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 2 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_000 # $250/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child at age 2: $175/month max (not $200) + # Expenses ($250/mo) > max ($175), so deduction = $175 + az_tanf_dependent_care_deduction: 175 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml index 8d42fa45206..f93d5009c13 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml @@ -7,7 +7,7 @@ input: people: person1: - employment_income: 0 + employment_income_before_lsr: 0 households: household: members: [person1] @@ -20,7 +20,7 @@ input: people: person1: - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual households: household: members: [person1] @@ -36,7 +36,7 @@ input: people: person1: - employment_income: 4_800 # $400/month annual + employment_income_before_lsr: 4_800 # $400/month annual households: household: members: [person1] @@ -52,7 +52,7 @@ input: people: person1: - employment_income: 600 # $50/month annual + employment_income_before_lsr: 600 # $50/month annual households: household: members: [person1] @@ -68,7 +68,7 @@ input: people: person1: - employment_income: 1_080 # $90/month annual + employment_income_before_lsr: 1_080 # $90/month annual households: household: members: [person1] @@ -84,7 +84,7 @@ input: people: person1: - employment_income: 12_000 # $1,000/month annual + employment_income_before_lsr: 12_000 # $1,000/month annual households: household: members: [person1] diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml index 05f79d75efb..e2aa4238a08 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml @@ -8,13 +8,11 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -36,9 +34,8 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true - is_citizen: true spm_units: spm_unit: members: [person1] @@ -61,13 +58,11 @@ people: person1: age: 30 - employment_income: 24_000 # $2,000/month annual + employment_income_before_lsr: 24_000 # $2,000/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -93,13 +88,11 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -122,9 +115,8 @@ people: person1: age: 25 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true - is_citizen: true is_pregnant: true spm_units: spm_unit: @@ -148,16 +140,13 @@ people: person1: age: 30 - employment_income: 3_600 # $300/month annual + employment_income_before_lsr: 3_600 # $300/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true person3: age: 3 - is_citizen: true spm_units: spm_unit: members: [person1, person2, person3] @@ -176,3 +165,114 @@ # Payment standard (A1): ~$347 # $147 < $347 - eligible az_tanf_eligible: true + +- name: Case 7, ineligible due to undocumented immigration status. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + immigration_status: UNDOCUMENTED + person2: + age: 5 + immigration_status: UNDOCUMENTED + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Both members undocumented - fails immigration eligibility + az_tanf_eligible: false + +- name: Case 8, eligible legal permanent resident. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + immigration_status: LEGAL_PERMANENT_RESIDENT + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # LPR is qualified alien - eligible + az_tanf_eligible: true + +- name: Case 9, resources exactly at limit. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_000 # Exactly at $2,000 limit + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Resources exactly at $2,000 limit - eligible + az_tanf_eligible: true + +- name: Case 10, resources one dollar over limit. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + is_parent_of_filer_or_spouse: true + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_001 # $1 over limit + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Resources $1 over limit - ineligible + az_tanf_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml index 752f1b9d4f8..57a4f308422 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml @@ -9,7 +9,7 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true person2: @@ -35,7 +35,7 @@ people: person1: age: 30 - employment_income: 3_600 # $300/month annual + employment_income_before_lsr: 3_600 # $300/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true person2: @@ -65,7 +65,7 @@ people: person1: age: 30 - employment_income: 9_600 # $800/month annual + employment_income_before_lsr: 9_600 # $800/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true person2: @@ -93,7 +93,7 @@ people: person1: age: 30 - employment_income: 1_800 # $150/month annual + employment_income_before_lsr: 1_800 # $150/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true person2: @@ -121,7 +121,7 @@ people: person1: age: 30 - employment_income: 3_600 # $300/month annual + employment_income_before_lsr: 3_600 # $300/month annual child_support_received: 600 # $50/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml index 0b012c06bfc..1f18bfbd7c1 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml @@ -17,16 +17,13 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true person3: age: 3 - is_citizen: true spm_units: spm_unit: members: [person1, person2, person3] @@ -66,16 +63,13 @@ people: person1: age: 28 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 4 - is_citizen: true person3: age: 2 - is_citizen: true spm_units: spm_unit: members: [person1, person2, person3] @@ -113,13 +107,11 @@ people: person1: age: 35 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 1 - is_citizen: true is_child: true spm_units: spm_unit: @@ -165,13 +157,11 @@ people: person1: age: 32 - employment_income: 9_600 # $800/month annual + employment_income_before_lsr: 9_600 # $800/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 7 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -207,13 +197,11 @@ people: person1: age: 30 - employment_income: 0 + employment_income_before_lsr: 0 is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -240,14 +228,12 @@ people: person1: age: 29 - employment_income: 4_800 # $400/month annual + employment_income_before_lsr: 4_800 # $400/month annual child_support_received: 1_200 # $100/month annual unearned is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 4 - is_citizen: true spm_units: spm_unit: members: [person1, person2] @@ -287,23 +273,18 @@ people: person1: age: 38 - employment_income: 4_800 # $400/month annual + employment_income_before_lsr: 4_800 # $400/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 36 is_parent_of_filer_or_spouse: true - is_citizen: true person3: age: 14 - is_citizen: true person4: age: 10 - is_citizen: true person5: age: 5 - is_citizen: true spm_units: spm_unit: members: [person1, person2, person3, person4, person5] @@ -344,22 +325,18 @@ people: person1: age: 30 - employment_income: 6_000 # $500/month annual + employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 28 - employment_income: 4_800 # $400/month annual + employment_income_before_lsr: 4_800 # $400/month annual is_parent_of_filer_or_spouse: true - is_citizen: true person3: age: 1 - is_citizen: true is_child: true person4: age: 4 - is_citizen: true is_child: true spm_units: spm_unit: @@ -407,16 +384,13 @@ people: person1: age: 30 - employment_income: 1_800 # $150/month annual + employment_income_before_lsr: 1_800 # $150/month annual is_tax_unit_head: true is_parent_of_filer_or_spouse: true - is_citizen: true person2: age: 5 - is_citizen: true person3: age: 3 - is_citizen: true spm_units: spm_unit: members: [person1, person2, person3] diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py index 6ca967d484a..c9060c0df9c 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py @@ -15,7 +15,8 @@ def formula(spm_unit, period, parameters): payment_standard = spm_unit("az_tanf_payment_standard", period) # Test 1: Needy family test (income <= FPG rate * FPG) - fpg_rate = spm_unit("az_tanf_fpg_rate", period) + # Use period.this_year for fpg_rate since it's a rate, not a flow + fpg_rate = spm_unit("az_tanf_fpg_rate", period.this_year) needy_family_test = countable_income <= fpg_rate * fpg # Test 2: Payment standard test (income <= payment standard) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py index 4397df4d679..1fb4789c507 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py @@ -15,8 +15,8 @@ class az_tanf_payment_standard(Variable): def formula(spm_unit, period, parameters): # Arizona uses monthly 1992 FPG baseline for payment standard - fpg_baseline = spm_unit("az_tanf_fpg_baseline", period) - monthly_fpg_baseline = fpg_baseline / MONTHS_IN_YEAR + # az_tanf_fpg_baseline is YEAR, auto-converted to monthly when called from MONTH context + monthly_fpg_baseline = spm_unit("az_tanf_fpg_baseline", period) p = parameters( period From b83dbf5018f9a87d37549758e0d618e0a89eed71 Mon Sep 17 00:00:00 2001 From: Ziming Date: Mon, 12 Jan 2026 20:47:10 -0500 Subject: [PATCH 5/6] adjustments --- .../income/earned/care_expenses/adult.yaml | 12 ---- .../tanf/eligibility/income/earned/flat.yaml | 12 ---- .../eligibility/income/earned/percentage.yaml | 12 ---- .../eligibility/payment_standard/high.yaml | 15 ----- .../eligibility/payment_standard/low.yaml | 17 ----- .../az/hhs/tanf/eligibility/rate/base.yaml | 12 ---- .../deductions/care_expenses/amounts.yaml} | 14 +++-- .../az/hhs/tanf/income/deductions/flat.yaml | 14 +++++ .../tanf/income/deductions/percentage.yaml | 14 +++++ .../az/hhs/tanf/income/fpg_limit/base.yaml | 14 +++++ .../rate => income/fpg_limit}/non_parent.yaml | 8 ++- .../az/hhs/tanf/payment_standard/rate.yaml | 26 ++++++++ .../hhs/tanf/payment_standard/reduction.yaml | 17 +++++ .../states/az/hhs/tanf/resources/limit.yaml | 8 ++- .../gov/states/az/hhs/tanf/az_tanf.yaml | 27 ++++---- .../az_tanf_dependent_care_deduction.yaml | 62 +++++++++---------- .../states/az/hhs/tanf/az_tanf_eligible.yaml | 16 ++--- .../states/az/hhs/tanf/az_tanf_fpg_rate.yaml | 8 +-- .../az/hhs/tanf/az_tanf_income_eligible.yaml | 10 +-- .../az/hhs/tanf/az_tanf_payment_standard.yaml | 18 +++--- .../gov/states/az/hhs/tanf/integration.yaml | 34 +++++----- .../gov/states/az/hhs/tanf/az_tanf.py | 2 +- .../hhs/tanf/eligibility/az_tanf_eligible.py | 2 +- .../tanf/eligibility/az_tanf_fpg_baseline.py | 2 +- .../hhs/tanf/eligibility/az_tanf_fpg_rate.py | 23 +++++-- .../eligibility/az_tanf_income_eligible.py | 2 +- .../eligibility/az_tanf_payment_standard.py | 18 +++--- .../income/az_tanf_countable_earned_income.py | 2 +- .../tanf/income/az_tanf_countable_income.py | 2 +- .../az_tanf_dependent_care_deduction.py | 26 +++----- ...nf_earned_income_after_disregard_person.py | 4 +- 31 files changed, 233 insertions(+), 220 deletions(-) delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml delete mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml rename policyengine_us/parameters/gov/states/az/hhs/tanf/{eligibility/income/earned/care_expenses/child_amounts.yaml => income/deductions/care_expenses/amounts.yaml} (52%) create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml rename policyengine_us/parameters/gov/states/az/hhs/tanf/{eligibility/rate => income/fpg_limit}/non_parent.yaml (52%) create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml create mode 100644 policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml deleted file mode 100644 index eb5c6e2cd77..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/adult.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Arizona deducts this amount of dependent care expenses for disabled adults under the Temporary Assistance for Needy Families program. - -metadata: - unit: currency-USD - period: month - label: Arizona TANF disabled adult dependent care deduction - reference: - - title: Arizona DES CNAP Manual FAA6.Dependent_Care_Amount_for_CA - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA - -values: - 2022-10-01: 175 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml deleted file mode 100644 index 75fb61023da..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/flat.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Arizona excludes this amount of earned income under the Temporary Assistance for Needy Families program. - -metadata: - unit: currency-USD - period: month - label: Arizona TANF flat earned income disregard - reference: - - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Earned Income Disregard - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA - -values: - 2022-10-01: 90 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml deleted file mode 100644 index ccca278fcbc..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/percentage.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Arizona excludes this share of earned income under the Temporary Assistance for Needy Families program. - -metadata: - unit: /1 - period: month - label: Arizona TANF earned income percentage disregard - reference: - - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Earned Income Disregard - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA - -values: - 2022-10-01: 0.3 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml deleted file mode 100644 index c9e9462dc41..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/high.yaml +++ /dev/null @@ -1,15 +0,0 @@ -description: Arizona uses this rate of the federal poverty guideline to calculate the higher payment standard under the Temporary Assistance for Needy Families program. - -metadata: - unit: /1 - period: year - label: Arizona TANF higher payment standard rate - reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA - - title: Arizona Department of Economic Security - Cash Assistance (CA) A1 chart - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/A1_Payment_Standards.html#wwpID0E0MM0HA - -values: - 2022-10-01: 0.288 - 2023-12-01: 0.36 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml deleted file mode 100644 index 96dd9b7d4a0..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/payment_standard/low.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: Arizona uses this rate of the federal poverty guideline to calculate the lower payment standard under the Temporary Assistance for Needy Families program. - -metadata: - unit: /1 - period: year - label: Arizona TANF lower payment standard rate - reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA - # The source rounds the results to a percentage of 22.65 instead of 23%, which is defined in the manual. - - title: Arizona Department of Economic Security - Cash Assistance (CA) A2 chart - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/A2_Payment_Standards.html#wwpID0E0DM0HA - - -values: - 2022-10-01: 0.184 - 2023-12-01: 0.23 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml deleted file mode 100644 index 05c47dea036..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/base.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Arizona limits income to this share of the federal poverty guideline under the Temporary Assistance for Needy Families program. - -metadata: - unit: /1 - period: year - label: Arizona TANF income limit rate - reference: - - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Needy Family Test - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA - -values: - 2022-10-01: 1 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml similarity index 52% rename from policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml rename to policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml index adf67c94562..ec98369c58b 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/income/earned/care_expenses/child_amounts.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml @@ -7,15 +7,17 @@ metadata: amount_unit: currency-USD label: Arizona TANF child dependent care deduction reference: - - title: Arizona DES CNAP Manual FAA6.Dependent_Care_Amount_for_CA - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA + - title: A.R.S. § 46-292 - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 brackets: - threshold: - 2022-10-01: 0 + 1997-01-01: 0 amount: - 2022-10-01: 200 + 1997-01-01: 200 - threshold: - 2022-10-01: 2 + 1997-01-01: 2 amount: - 2022-10-01: 175 + 1997-01-01: 175 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml new file mode 100644 index 00000000000..e23534c4b3c --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml @@ -0,0 +1,14 @@ +description: Arizona excludes this amount of earned income under the Temporary Assistance for Needy Families program. + +metadata: + unit: currency-USD + period: month + label: Arizona TANF flat earned income disregard + reference: + - title: A.R.S. § 46-292 - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 90 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml new file mode 100644 index 00000000000..f315ac2752c --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml @@ -0,0 +1,14 @@ +description: Arizona excludes this share of earned income under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: month + label: Arizona TANF earned income percentage disregard + reference: + - title: A.R.S. § 46-292 - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 0.3 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml new file mode 100644 index 00000000000..224d6e9ba42 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml @@ -0,0 +1,14 @@ +description: Arizona limits income to this share of the federal poverty guideline under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF income limit rate + reference: + - title: A.R.S. § 46-292 - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 1 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml similarity index 52% rename from policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml rename to policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml index 1d10ff5abab..a7cce96a9eb 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/rate/non_parent.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml @@ -5,8 +5,10 @@ metadata: period: year label: Arizona TANF non-parent income limit rate reference: - - title: Arizona DES CNAP Manual FAA5.CA_Benefit_Determination - Non-Parent Relative Rate - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA + - title: A.R.S. § 46-292 - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 values: - 2022-10-01: 1.3 + 1997-01-01: 1.3 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml new file mode 100644 index 00000000000..1f260a9c1dc --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml @@ -0,0 +1,26 @@ +description: Arizona uses this rate of the 1992 federal poverty guideline as the payment standard under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF payment standard rate + reference: + - title: A.R.S. § 46-207.01 - Temporary assistance for needy families; amount of cash assistance + href: https://www.azleg.gov/ars/46/00207-01.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=21 + - title: Arizona DES CNAP Manual - What's Changed 11/27/2023 (TANF Benefit Amount Increase effective 12/01/2023) + href: https://dbmefaapolicy.azdes.gov/Archived_Policy/baggage/2023-11-27_WhatChanged.pdf#page=1 + +# Per A.R.S. § 46-207.01: "shall not be less than thirty-six per cent of the 1992 federal poverty level" +values: + # Statutory floor per A.R.S. 46-207.01 + 1997-01-01: 0.36 + # 20% benefit cut during Great Recession (0.36 * 0.80 = 0.288) + # Sources: CBPP, CLASP, Arizona Center for Economic Progress + # https://www.cbpp.org/blog/arizonas-tanf-experience-highlights-problems-with-block-granting-safety-net-programs + # https://www.clasp.org/blog/arizona-cuts-tanf-lifetime-limit-12-months-harshest-country/ + # https://azeconcenter.org/propublica-feature-strengthens-case-for-improving-cash-assistance-in-arizona/ + 2009-07-01: 0.288 + # Restored to statutory floor + 2023-12-01: 0.36 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml new file mode 100644 index 00000000000..66d90557907 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml @@ -0,0 +1,17 @@ +description: Arizona reduces the payment standard by this rate for recipients without shelter costs under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF payment standard reduction rate + reference: + - title: A.R.S. § 46-207 - Grant plus income; uniform assistance plan; amount of assistance + href: https://www.azleg.gov/ars/46/00207.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=21 + +# Per A.R.S. § 46-207: "the department shall reduce the federal poverty level used in +# its calculation of payments by thirty-seven per cent if the person is not paying, +# or is not obligated to pay, shelter costs on his place of residence" +values: + 1997-01-01: 0.37 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml index 0dafe3f16f6..5a26cd00b19 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml @@ -1,12 +1,14 @@ description: Arizona limits resources to this amount under the Temporary Assistance for Needy Families program. values: - 2022-10-01: 2_000 + 1997-01-01: 2_000 metadata: unit: currency-USD period: month label: Arizona TANF resource limit reference: - - title: Arizona DES CNAP Manual FAA5 - Resource Eligibility - href: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/Resource_Eligibility.html + - title: Arizona DES - Cash Assistance Income Eligibility Guidelines + href: https://des.az.gov/services/child-and-family/cash-assistance/income-eligibility-guidelines + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=20 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml index 98831e2fe68..55f3c7caca1 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml @@ -11,7 +11,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -42,7 +42,7 @@ age: 30 employment_income_before_lsr: 3_600 # $300/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -71,7 +71,7 @@ age: 30 employment_income_before_lsr: 24_000 # $2,000/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -99,7 +99,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 person3: @@ -133,7 +133,7 @@ employment_income_before_lsr: 0 child_support_received: 1_200 # $100/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -163,7 +163,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -180,10 +180,11 @@ state_code: AZ output: # Family of 2, no shelter (A2) - # Payment standard: ~$176 + # A2 = A1 × (1 - 37%) = 36% × 63% = 22.68% + # Payment standard: $765.83 * 0.2268 = ~$174 # Countable income: $0 - # Benefit: $176 - az_tanf: 176 + # Benefit: $174 + az_tanf: 174 - name: Case 7, eligible but zero benefit. period: 2024-01 @@ -194,7 +195,7 @@ age: 30 employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -211,7 +212,7 @@ state_code: AZ output: # Countable earned: $500 - $90 = $410, * 0.70 = $287 - # Payment standard (A2 for family of 2): ~$176 - # $287 > $176 - income exceeds payment standard - # Benefit: max($176 - $287, 0) = $0 + # Payment standard (A2 for family of 2): ~$174 + # $287 > $174 - income exceeds payment standard + # Benefit: max($174 - $287, 0) = $0 az_tanf: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml index 4a0f383ab72..125dc2bbc8b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml @@ -1,7 +1,7 @@ # Unit tests for Arizona TANF dependent care deduction -# Child under 2: $200/month max, Child 2+: $175/month max, Disabled adult: $175/month max -# Deduction capped at actual care expenses -# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html +# Child under 2: $200/month max, Child 2+: $175/month max +# Deduction capped at actual childcare expenses +# Reference: https://www.azleg.gov/ars/46/00292.htm - name: Case 1, no childcare expenses. period: 2024-01 @@ -11,11 +11,14 @@ age: 30 person2: age: 1 - is_child: true + is_tax_unit_dependent: true spm_units: spm_unit: members: [person1, person2] childcare_expenses: 0 + tax_units: + tax_unit: + members: [person1, person2] households: household: members: [person1, person2] @@ -31,11 +34,14 @@ age: 30 person2: age: 1 - is_child: true + is_tax_unit_dependent: true spm_units: spm_unit: members: [person1, person2] childcare_expenses: 3_600 # $300/month annual + tax_units: + tax_unit: + members: [person1, person2] households: household: members: [person1, person2] @@ -53,11 +59,14 @@ age: 30 person2: age: 4 - is_child: true + is_tax_unit_dependent: true spm_units: spm_unit: members: [person1, person2] childcare_expenses: 3_600 # $300/month annual + tax_units: + tax_unit: + members: [person1, person2] households: household: members: [person1, person2] @@ -75,11 +84,14 @@ age: 30 person2: age: 1 - is_child: true + is_tax_unit_dependent: true spm_units: spm_unit: members: [person1, person2] childcare_expenses: 1_800 # $150/month annual + tax_units: + tax_unit: + members: [person1, person2] households: household: members: [person1, person2] @@ -97,14 +109,17 @@ age: 30 person2: age: 1 - is_child: true + is_tax_unit_dependent: true person3: age: 4 - is_child: true + is_tax_unit_dependent: true spm_units: spm_unit: members: [person1, person2, person3] childcare_expenses: 6_000 # $500/month annual + tax_units: + tax_unit: + members: [person1, person2, person3] households: household: members: [person1, person2, person3] @@ -116,29 +131,7 @@ # Expenses ($500/mo) > max ($375), so deduction = $375 az_tanf_dependent_care_deduction: 375 -- name: Case 6, disabled adult care. - period: 2024-01 - input: - people: - person1: - age: 30 - pre_subsidy_care_expenses: 200 # $200/month - person2: - age: 65 - is_disabled: true - spm_units: - spm_unit: - members: [person1, person2] - households: - household: - members: [person1, person2] - state_code: AZ - output: - # Disabled adult: max $175/month - # Expenses ($200/mo) > max ($175), so deduction = $175 - az_tanf_dependent_care_deduction: 175 - -- name: Case 7, child exactly at age 2 boundary. +- name: Case 6, child exactly at age 2 boundary. period: 2024-01 input: people: @@ -146,11 +139,14 @@ age: 30 person2: age: 2 - is_child: true + is_tax_unit_dependent: true spm_units: spm_unit: members: [person1, person2] childcare_expenses: 3_000 # $250/month annual + tax_units: + tax_unit: + members: [person1, person2] households: household: members: [person1, person2] diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml index e2aa4238a08..aa4972efb8d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml @@ -10,7 +10,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -60,7 +60,7 @@ age: 30 employment_income_before_lsr: 24_000 # $2,000/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -90,7 +90,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -142,7 +142,7 @@ age: 30 employment_income_before_lsr: 3_600 # $300/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 person3: @@ -174,7 +174,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 immigration_status: UNDOCUMENTED person2: age: 5 @@ -203,7 +203,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 immigration_status: LEGAL_PERMANENT_RESIDENT person2: age: 5 @@ -231,7 +231,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -258,7 +258,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml index 154e9327f08..38a52dfaf2b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml @@ -9,7 +9,7 @@ person1: age: 30 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -33,7 +33,7 @@ person1: age: 50 is_tax_unit_head: true - is_parent_of_filer_or_spouse: false + own_children_in_household: 0 person2: age: 10 spm_units: @@ -57,10 +57,10 @@ person1: age: 35 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 33 - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person3: age: 8 spm_units: diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml index 57a4f308422..8f442513d20 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml @@ -11,7 +11,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -37,7 +37,7 @@ age: 30 employment_income_before_lsr: 3_600 # $300/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -67,7 +67,7 @@ age: 30 employment_income_before_lsr: 9_600 # $800/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -95,7 +95,7 @@ age: 30 employment_income_before_lsr: 1_800 # $150/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -124,7 +124,7 @@ employment_income_before_lsr: 3_600 # $300/month annual child_support_received: 600 # $50/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 person3: diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml index 4db65ea7147..690c678035f 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml @@ -1,7 +1,7 @@ # Unit tests for Arizona TANF payment standard -# A1 (high/with shelter): 36% of 1992 FPG monthly baseline -# A2 (low/without shelter): 23% of 1992 FPG monthly baseline -# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Payment_Standard_(A1_2fA2).html +# A1 (with shelter): 36% of 1992 FPG monthly baseline per A.R.S. § 46-207.01 +# A2 (without shelter): A1 reduced by 37% per A.R.S. § 46-207 = 36% × 63% = 22.68% +# Reference: https://www.azleg.gov/ars/46/00207-01.htm, https://www.azleg.gov/ars/46/00207.htm - name: Case 1, family of 2 with shelter costs (A1). period: 2024-01 @@ -47,9 +47,9 @@ output: # 1992 FPG for 2: $9,190 annual # Monthly: $9,190 / 12 = $765.83 - # A2 rate: 23% - # Payment standard: $765.83 * 0.23 = $176.14 - az_tanf_payment_standard: 176 + # A2: A1 reduced by 37% = 36% × 63% = 22.68% + # Payment standard: $765.83 * 0.36 * 0.63 = $173.68 + az_tanf_payment_standard: 174 - name: Case 3, family of 3 with shelter costs (A1). period: 2024-01 @@ -99,9 +99,9 @@ output: # 1992 FPG for 3: $11,570 annual # Monthly: $11,570 / 12 = $964.17 - # A2 rate: 23% - # Payment standard: $964.17 * 0.23 = $221.76 - az_tanf_payment_standard: 222 + # A2: A1 reduced by 37% = 36% × 63% = 22.68% + # Payment standard: $964.17 * 0.36 * 0.63 = $218.67 + az_tanf_payment_standard: 219 - name: Case 5, family of 4 with shelter costs (A1). period: 2024-01 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml index 1f18bfbd7c1..8bbcede1fab 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml @@ -4,7 +4,7 @@ # # Key Arizona TANF rules: # - Earned income disregard: $90 flat + 30% of remainder -# - Payment standard: A1 (36% of 1992 FPG) with shelter, A2 (23%) without +# - Payment standard: A1 (36% of 1992 FPG) with shelter, A2 (A1 reduced by 37%) without # - 1992 FPG (CONTIGUOUS_US): first_person = $6,810, additional = $2,380 # - Resource limit: $2,000 # - Needy family test: FPG rate * current FPG (100% for parents, 130% for non-parent relatives) @@ -19,7 +19,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 person3: @@ -65,7 +65,7 @@ age: 28 employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 4 person3: @@ -109,7 +109,7 @@ age: 35 employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 1 is_child: true @@ -159,7 +159,7 @@ age: 32 employment_income_before_lsr: 9_600 # $800/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 7 spm_units: @@ -199,7 +199,7 @@ age: 30 employment_income_before_lsr: 0 is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 spm_units: @@ -231,7 +231,7 @@ employment_income_before_lsr: 4_800 # $400/month annual child_support_received: 1_200 # $100/month annual unearned is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 4 spm_units: @@ -275,10 +275,10 @@ age: 38 employment_income_before_lsr: 4_800 # $400/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 36 - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person3: age: 14 person4: @@ -327,11 +327,11 @@ age: 30 employment_income_before_lsr: 6_000 # $500/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 28 employment_income_before_lsr: 4_800 # $400/month annual - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person3: age: 1 is_child: true @@ -386,7 +386,7 @@ age: 30 employment_income_before_lsr: 1_800 # $150/month annual is_tax_unit_head: true - is_parent_of_filer_or_spouse: true + own_children_in_household: 1 person2: age: 5 person3: @@ -417,8 +417,8 @@ az_tanf_eligible: true # Family of 3, 1992 FPG: $11,570 annual # Monthly: $11,570 / 12 = $964.17 - # A2 rate (no shelter): 23% - # Payment standard: $964.17 * 0.23 = $221.76 ~ $222 - az_tanf_payment_standard: 222 - # Benefit: $222 - $42 = $180 - az_tanf: 180 + # A2: A1 (36%) reduced by 37% = 36% × 63% = 22.68% + # Payment standard: $964.17 * 0.36 * 0.63 = $218.67 ~ $219 + az_tanf_payment_standard: 219 + # Benefit: $219 - $42 = $177 + az_tanf: 177 diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py index 84121fc398e..809b74df277 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py @@ -7,7 +7,7 @@ class az_tanf(Variable): label = "Arizona TANF" unit = USD definition_period = MONTH - reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + reference = "https://www.azleg.gov/ars/46/00207-01.htm" defined_for = "az_tanf_eligible" def formula(spm_unit, period, parameters): diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py index e664ce55429..0671340f9f4 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py @@ -6,7 +6,7 @@ class az_tanf_eligible(Variable): entity = SPMUnit label = "Eligible for Arizona TANF" definition_period = MONTH - reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py index d395da391e6..113fadb9a31 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py @@ -7,7 +7,7 @@ class az_tanf_fpg_baseline(Variable): label = "Arizona TANF payment standard FPG baseline" unit = USD definition_period = YEAR - reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + reference = "https://www.azleg.gov/ars/46/00207-01.htm" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py index 95e2d4ecac8..9781bac36aa 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py @@ -6,16 +6,27 @@ class az_tanf_fpg_rate(Variable): entity = SPMUnit label = "Arizona TANF needy family FPG rate" definition_period = YEAR - reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): - # Non-parent relatives get 130% FPG; parents get 100% FPG - p = parameters(period).gov.states.az.hhs.tanf.eligibility.rate + # 130% FPG for non-parent relative heads requesting CA only for dependent children + # 100% FPG for all other families (default) + # Reference: A.R.S. § 46-292 + p = parameters(period).gov.states.az.hhs.tanf.income.fpg_limit person = spm_unit.members is_head = person("is_tax_unit_head", period) - is_parent = person("is_parent_of_filer_or_spouse", period) - has_parent_head = spm_unit.any(is_head & is_parent) + # Use is_parent which checks own_children_in_household > 0 + is_parent = person("is_parent", period) + is_child = person("is_child", period) - return where(has_parent_head, p.base, p.non_parent) + # Check if head is a parent (has own children in household) + head_is_parent = spm_unit.any(is_head & is_parent) + # Check if there are children in the unit + has_children = spm_unit.any(is_child) + + # Non-parent relative caretaker: head is NOT a parent but unit HAS children + is_non_parent_relative_case = ~head_is_parent & has_children + + return where(is_non_parent_relative_case, p.non_parent, p.base) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py index c9060c0df9c..25721321193 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py @@ -6,7 +6,7 @@ class az_tanf_income_eligible(Variable): entity = SPMUnit label = "Arizona TANF income eligible" definition_period = MONTH - reference = "https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py index 1fb4789c507..bac168724e1 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py @@ -8,8 +8,8 @@ class az_tanf_payment_standard(Variable): unit = USD definition_period = MONTH reference = ( - "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/" - "CA_Payment_Standard_(A1_2fA2).html#wwpID0E0WHB0FA" + "https://www.azleg.gov/ars/46/00207-01.htm", + "https://www.azleg.gov/ars/46/00207.htm", ) defined_for = StateCode.AZ @@ -18,15 +18,15 @@ def formula(spm_unit, period, parameters): # az_tanf_fpg_baseline is YEAR, auto-converted to monthly when called from MONTH context monthly_fpg_baseline = spm_unit("az_tanf_fpg_baseline", period) - p = parameters( - period - ).gov.states.az.hhs.tanf.eligibility.payment_standard + p = parameters(period).gov.states.az.hhs.tanf.payment_standard - # A1 (high) if shelter costs > 0; A2 (low) otherwise + # Base payment standard (A1) per A.R.S. § 46-207.01 + base_standard = p.rate * monthly_fpg_baseline + + # A2 = A1 reduced by 37% for those without shelter costs per A.R.S. § 46-207 shelter_cost = spm_unit("housing_cost", period) has_shelter_costs = shelter_cost > 0 - high_threshold = p.high * monthly_fpg_baseline - low_threshold = p.low * monthly_fpg_baseline + reduced_standard = base_standard * (1 - p.reduction) - return where(has_shelter_costs, high_threshold, low_threshold) + return where(has_shelter_costs, base_standard, reduced_standard) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py index cf6e11daeb8..d209324a8ec 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py @@ -7,7 +7,7 @@ class az_tanf_countable_earned_income(Variable): label = "Arizona TANF countable earned income" unit = USD definition_period = MONTH - reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py index 9a6fcdd1528..0388b411c2f 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py @@ -7,7 +7,7 @@ class az_tanf_countable_income(Variable): label = "Arizona TANF countable income" unit = USD definition_period = MONTH - reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ adds = ["az_tanf_countable_earned_income", "tanf_gross_unearned_income"] diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py index 3037136d3ab..1f883b1f6ef 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py @@ -7,32 +7,26 @@ class az_tanf_dependent_care_deduction(Variable): label = "Arizona TANF dependent care deduction" unit = USD definition_period = MONTH - reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA6/Dependent_Care_Amount_for_CA.html#wwpID0E0HO0HA" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ def formula(spm_unit, period, parameters): p = parameters( period - ).gov.states.az.hhs.tanf.eligibility.income.earned.care_expenses + ).gov.states.az.hhs.tanf.income.deductions.care_expenses person = spm_unit.members age = person("age", period.this_year) - # Actual care expenses (childcare + adult care) - care_expenses = add( - spm_unit, period, ["childcare_expenses", "care_expenses"] - ) + # Actual childcare expenses + childcare_expenses = spm_unit("childcare_expenses", period) - # Calculate eligible deduction for children (based on age) - is_child = person("is_child", period) - child_amount = p.child_amounts.calc(age) * is_child - - # Calculate eligible deduction for disabled adults - disabled_adult = person("is_disabled", period.this_year) & ~is_child - adult_amount = disabled_adult * p.adult + # Calculate eligible deduction for dependent children (based on age) + is_dependent = person("is_tax_unit_dependent", period.this_year) + child_amount = p.amounts.calc(age) * is_dependent # Total eligible deduction - total_eligible = spm_unit.sum(child_amount + adult_amount) + total_eligible = spm_unit.sum(child_amount) - # Deduction is capped at actual care expenses - return min_(care_expenses, total_eligible) + # Deduction is capped at actual childcare expenses + return min_(childcare_expenses, total_eligible) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py index 49a00857ffd..5759197f565 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py @@ -7,7 +7,7 @@ class az_tanf_earned_income_after_disregard_person(Variable): label = "Arizona TANF earned income after disregard per person" unit = USD definition_period = MONTH - reference = "https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html#wwpID0E0NQB0FA" + reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ def formula(person, period, parameters): @@ -15,7 +15,7 @@ def formula(person, period, parameters): gross_earned = person("tanf_gross_earned_income", period) # Step 2: Apply $90 flat disregard, then 30% percentage disregard - p = parameters(period).gov.states.az.hhs.tanf.eligibility.income.earned + p = parameters(period).gov.states.az.hhs.tanf.income.deductions after_flat = max_(gross_earned - p.flat, 0) after_percentage = after_flat * (1 - p.percentage) From 401a8676e44506ddb1dbe1295687c6152387a4e7 Mon Sep 17 00:00:00 2001 From: Ziming Date: Mon, 12 Jan 2026 21:13:47 -0500 Subject: [PATCH 6/6] minor --- .../deductions/care_expenses/amounts.yaml | 2 +- .../az/hhs/tanf/income/deductions/flat.yaml | 2 +- .../tanf/income/deductions/percentage.yaml | 2 +- .../az/hhs/tanf/income/fpg_limit/base.yaml | 4 +- .../hhs/tanf/income/fpg_limit/non_parent.yaml | 2 +- .../az/hhs/tanf/payment_standard/rate.yaml | 2 +- .../hhs/tanf/payment_standard/reduction.yaml | 4 +- .../states/az/hhs/tanf/az_tanf_fpg_rate.yaml | 6 +- .../gov/states/az/hhs/tanf/integration.yaml | 149 ++++++++++++++++++ .../hhs/tanf/eligibility/az_tanf_fpg_rate.py | 9 +- 10 files changed, 166 insertions(+), 16 deletions(-) diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml index ec98369c58b..f0c8ea049d7 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml @@ -7,7 +7,7 @@ metadata: amount_unit: currency-USD label: Arizona TANF child dependent care deduction reference: - - title: A.R.S. § 46-292 - Eligibility for assistance + - title: A.R.S. § 46-292(P) - Eligibility for assistance href: https://www.azleg.gov/ars/46/00292.htm - title: 2023 Arizona TANF State Plan href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml index e23534c4b3c..3663cb2554c 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml @@ -5,7 +5,7 @@ metadata: period: month label: Arizona TANF flat earned income disregard reference: - - title: A.R.S. § 46-292 - Eligibility for assistance + - title: A.R.S. § 46-292(P) - Eligibility for assistance href: https://www.azleg.gov/ars/46/00292.htm - title: 2023 Arizona TANF State Plan href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml index f315ac2752c..d7e11ed4268 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml @@ -5,7 +5,7 @@ metadata: period: month label: Arizona TANF earned income percentage disregard reference: - - title: A.R.S. § 46-292 - Eligibility for assistance + - title: A.R.S. § 46-292(P) - Eligibility for assistance href: https://www.azleg.gov/ars/46/00292.htm - title: 2023 Arizona TANF State Plan href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml index 224d6e9ba42..2b21f3a4f15 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml @@ -5,8 +5,8 @@ metadata: period: year label: Arizona TANF income limit rate reference: - - title: A.R.S. § 46-292 - Eligibility for assistance - href: https://www.azleg.gov/ars/46/00292.htm + - title: Arizona DES - Cash Assistance Income Eligibility Guidelines + href: https://des.az.gov/services/child-and-family/cash-assistance/income-eligibility-guidelines - title: 2023 Arizona TANF State Plan href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml index a7cce96a9eb..b1cacb20b35 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml @@ -5,7 +5,7 @@ metadata: period: year label: Arizona TANF non-parent income limit rate reference: - - title: A.R.S. § 46-292 - Eligibility for assistance + - title: A.R.S. § 46-292(Q) - Eligibility for assistance href: https://www.azleg.gov/ars/46/00292.htm - title: 2023 Arizona TANF State Plan href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml index 1f260a9c1dc..348ac0a64fb 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml @@ -1,4 +1,4 @@ -description: Arizona uses this rate of the 1992 federal poverty guideline as the payment standard under the Temporary Assistance for Needy Families program. +description: Arizona uses this share of the 1992 federal poverty guideline as the payment standard under the Temporary Assistance for Needy Families program. metadata: unit: /1 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml index 66d90557907..47df41c0f4b 100644 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml @@ -1,11 +1,11 @@ -description: Arizona reduces the payment standard by this rate for recipients without shelter costs under the Temporary Assistance for Needy Families program. +description: Arizona sets this share as the payment standard reduction for recipients without shelter costs under the Temporary Assistance for Needy Families program. metadata: unit: /1 period: year label: Arizona TANF payment standard reduction rate reference: - - title: A.R.S. § 46-207 - Grant plus income; uniform assistance plan; amount of assistance + - title: A.R.S. § 46-207(D) - Grant plus income; uniform assistance plan; amount of assistance href: https://www.azleg.gov/ars/46/00207.htm - title: 2023 Arizona TANF State Plan href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=21 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml index 38a52dfaf2b..5c422bc4780 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml @@ -3,7 +3,7 @@ # Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html - name: Case 1, parent caregiver. - period: 2024 + period: 2024-01 input: people: person1: @@ -27,7 +27,7 @@ az_tanf_fpg_rate: 1 - name: Case 2, non-parent relative caregiver. - period: 2024 + period: 2024-01 input: people: person1: @@ -51,7 +51,7 @@ az_tanf_fpg_rate: 1.3 - name: Case 3, two parents. - period: 2024 + period: 2024-01 input: people: person1: diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml index 8bbcede1fab..0fec6153a97 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml @@ -422,3 +422,152 @@ az_tanf_payment_standard: 219 # Benefit: $219 - $42 = $177 az_tanf: 177 + +- name: Scenario 10, historical period with 20% benefit cut (2023). + # Tests the reduced benefit rate during 2009-2023 period (0.288 instead of 0.36) + # Reference: Arizona implemented 20% cut during Great Recession (restored Dec 2023) + period: 2023-01 + absolute_error_margin: 0.1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_000 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation - no income + az_tanf_countable_income: 0 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 3, 1992 FPG: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A1 rate in 2023: 28.8% (20% cut from 36%) + # Payment standard: $964.17 * 0.288 = $277.68 + az_tanf_payment_standard: 277.68 + # Benefit: $277.68 - $0 = $277.68 + az_tanf: 277.68 + +- name: Scenario 11, non-parent relative caretaker with income. + # Tests 130% FPG rate for non-parent relative (grandparent caring for grandchild) + # Reference: A.R.S. § 46-292 - non-parent relative cases have 130% FPG limit + period: 2024-01 + absolute_error_margin: 0.1 + input: + people: + person1: + age: 55 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 0 # Not the parent + person2: + age: 8 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_500 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Non-parent relative case: head has no own children, unit has children + az_tanf_fpg_rate: 1.3 # 130% FPG rate for non-parent relative + # Income calculation + # Person1: $300 - $90 = $210, * 0.70 = $147 + az_tanf_earned_income_after_disregard_person: [147, 0] + az_tanf_countable_earned_income: 147 + az_tanf_countable_income: 147 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 2, 1992 FPG: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A1 rate: 36% + # Payment standard: $765.83 * 0.36 = $275.70 + az_tanf_payment_standard: 275.7 + # Benefit: $275.70 - $147 = $128.70 + az_tanf: 128.7 + +- name: Scenario 12, large family of 6 members. + # Tests payment standard extrapolation for family size > 5 + # 1992 FPG formula: $6,810 + (n-1) * $2,380 + period: 2024-01 + absolute_error_margin: 0.1 + input: + people: + person1: + age: 40 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 38 + own_children_in_household: 1 + person3: + age: 16 + person4: + age: 12 + person5: + age: 8 + person6: + age: 4 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5, person6] + spm_unit_assets: 1_800 + housing_cost: 900 + tax_units: + tax_unit: + members: [person1, person2, person3, person4, person5, person6] + households: + household: + members: [person1, person2, person3, person4, person5, person6] + state_code: AZ + output: + # Demographics - only children under 18 are demographically eligible + is_person_demographic_tanf_eligible: [false, false, true, true, true, true] + # Income calculation + # Person1: $300 - $90 = $210, * 0.70 = $147 + az_tanf_earned_income_after_disregard_person: [147, 0, 0, 0, 0, 0] + az_tanf_countable_earned_income: 147 + az_tanf_countable_income: 147 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 6, 1992 FPG: $6,810 + 5*$2,380 = $18,710 annual + # Monthly: $18,710 / 12 = $1,559.17 + # A1 rate: 36% + # Payment standard: $1,559.17 * 0.36 = $561.30 + az_tanf_payment_standard: 561.3 + # Benefit: $561.30 - $147 = $414.30 + az_tanf: 414.3 diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py index 9781bac36aa..6a40f3183c6 100644 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py @@ -5,7 +5,7 @@ class az_tanf_fpg_rate(Variable): value_type = float entity = SPMUnit label = "Arizona TANF needy family FPG rate" - definition_period = YEAR + definition_period = MONTH reference = "https://www.azleg.gov/ars/46/00292.htm" defined_for = StateCode.AZ @@ -16,10 +16,11 @@ def formula(spm_unit, period, parameters): p = parameters(period).gov.states.az.hhs.tanf.income.fpg_limit person = spm_unit.members - is_head = person("is_tax_unit_head", period) + # Use period.this_year for YEAR-defined demographic variables + is_head = person("is_tax_unit_head", period.this_year) # Use is_parent which checks own_children_in_household > 0 - is_parent = person("is_parent", period) - is_child = person("is_child", period) + is_parent = person("is_parent", period.this_year) + is_child = person("is_child", period.this_year) # Check if head is a parent (has own children in household) head_is_parent = spm_unit.any(is_head & is_parent)