Skip to content

Conversation

@hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Dec 19, 2025

Summary

Implements Mississippi's Temporary Assistance for Needy Families (TANF) program.

Closes #7012

Regulatory Authority

Parameter Time Periods

Parameters include historical values with proper effective dates:

Need Standard (100% Requirements)

Family Size 2018-07-01 2025-07-01
1 $218 $339
2 $293 $460
3 $368 $581
4 $443 $702
5 $518 $823
6 $593 $944
7 $668 $1,065
8 $743 $1,186
9 $818 $1,307
10 $893 $1,428

Gross Income Limit (185% of Need Standard)

Family Size 2018-07-01 2025-07-01
1 $403 $627
2 $542 $851
3 $680 $1,074
4 $819 $1,298
5 $958 $1,522
6 $1,097 $1,746
7 $1,235 $1,970
8 $1,374 $2,194
9 $1,513 $2,417
10 $1,652 $2,641

Source: Miss. Code. tit. 18, pt. 19 - "income at or below 185 percent of the need standard"

Payment Standards (Maximum Monthly Benefit)

Component 2018-07-01 2021-05-01
First person $110 $200
Second person $36 $36
Each additional $24 $24
Family Size 2018 Amount 2021+ Amount
1 $110 $200
2 $146 $236
3 $170 $260
4 $194 $284
5 $218 $308

Income Deductions & Exemptions

  • Simplified Implementation: Uses federal TANF gross income baseline
  • Time-limited disregards not implemented:
    • 6-month total earned income disregard (35+ hrs/week employment within 30 days of approval)
    • 3-month total earned income disregard (case closing due to increased earnings)
    • These cannot be tracked in PolicyEngine's single-period simulation architecture
    • Source: Miss. Code. tit. 18, pt. 19

Benefit Calculation

Benefit = Maximum Payment Standard - Countable Income
If Benefit < 0, Benefit = $0

Resource Limit

  • Limit: $2,000 for all households
  • Effective: 2018-07-01
  • Exclusions: Primary residence, personal vehicle

Source: MDHS TANF Eligibility Flyer (2018)

Files

Parameters (7 files)

policyengine_us/parameters/gov/states/ms/dhs/tanf/
├── income/
│   └── gross_income_limit_rate.yaml
├── need_standard/
│   ├── amount.yaml
│   └── max_table_size.yaml
├── payment_standard/
│   ├── additional_person.yaml
│   ├── first_person.yaml
│   └── second_person.yaml
└── resources/
    └── limit.yaml

Variables (6 files)

policyengine_us/variables/gov/states/ms/dhs/tanf/
├── eligibility/
│   ├── ms_tanf_eligible.py
│   ├── ms_tanf_income_eligible.py
│   └── ms_tanf_resources_eligible.py
├── ms_tanf.py
├── ms_tanf_countable_income.py
└── ms_tanf_maximum_benefit.py

Tests (6 files, 58 tests)

policyengine_us/tests/policy/baseline/gov/states/ms/dhs/tanf/
├── integration.yaml (7 tests)
├── ms_tanf.yaml (11 tests)
├── ms_tanf_eligible.yaml (8 tests)
├── ms_tanf_income_eligible.yaml (13 tests)
├── ms_tanf_maximum_benefit.yaml (12 tests)
└── ms_tanf_resources_eligible.yaml (7 tests)

Test Coverage

Component Tests Coverage
Benefit calculation 11 Zero income, reduced benefits, edge cases
Income eligibility 13 Family sizes 1-4 + size 11 (cap test), boundary conditions
Resources eligibility 7 Zero to over limit, boundary at $2,000
Maximum benefit 12 Family sizes 1-11
Overall eligibility 8 All eligibility combinations
Integration 7 End-to-end realistic scenarios

Example Calculations (using 2025-07-01 values)

Example 1: Single Parent with One Child, No Income

  • Household size: 2
  • Gross income: $0
  • Need standard (size 2): $460
  • Income limit (185%): $851
  • Income eligible: $0 ≤ $851 ✓
  • Resources: $500 ≤ $2,000 ✓
  • Payment standard: $200 + $36 = $236
  • Benefit: $236 - $0 = $236/month

Example 2: Family of 3 at Income Threshold

  • Household size: 3
  • Monthly gross income: $1,074
  • Need standard (size 3): $581
  • Income limit (185%): $1,074.85
  • Income eligible: $1,074 ≤ $1,074.85 ✓
  • Payment standard: $200 + $36 + $24 = $260
  • Benefit: $260 - $1,074 = $0 (income exceeds payment standard)

🤖 Generated with Claude Code

Starting implementation of Mississippi TANF (Temporary Assistance for Needy Families).
Documentation and parallel development will follow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hua7450 hua7450 closed this Dec 19, 2025
@hua7450 hua7450 reopened this Dec 19, 2025
Implements Mississippi Temporary Assistance for Needy Families (TANF)
program including income eligibility, resources eligibility, benefit
calculation, and payment standards.

Closes PolicyEngine#7012

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9e807c3) to head (5900c85).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7011   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         6    -3     
  Lines          124        81   -43     
=========================================
- Hits           124        81   -43     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450 hua7450 mentioned this pull request Dec 19, 2025
12 tasks
@PavelMakarchuk
Copy link
Collaborator

📋 PR Review - Mississippi TANF

✅ Overall Assessment: APPROVED

This is a well-structured implementation of Mississippi's TANF program with comprehensive coverage of eligibility rules, income calculations, and benefit amounts.


🟢 Passed Checks

Check Result
Regulatory Accuracy ✅ Passed
Code Patterns ✅ Passed
CI Status ✅ All passing

Strengths:

  • Proper vectorization throughout (uses where(), max_(), add())
  • No hard-coded values - all thresholds use parameters
  • Good test coverage with 58 tests across 6 test files
  • Correct period handling for income variables
  • Proper use of adds attribute for simple sums

🟡 Should Address (Minor)

  1. PDF Page Anchors Missing - Several references link to PDFs without #page=XX anchors:

    • need_standard/amount.yaml - Add page anchor to TEA Manual PDF
    • income_limit/rate.yaml - Add page anchor
    • resource_limit/amount.yaml - Add page anchor
    • income/disregard/work_related/amount.yaml - Add page anchor
    • income/disregard/thirty_and_one_third/rate.yaml - Add page anchor
    • eligibility/age/minor_child_threshold.yaml - Add page anchor
  2. Missing Unit Test - Consider adding ms_tanf_countable_income.yaml unit test to verify the income calculation chain independently.


🟢 Suggestions (Optional)

  1. Historical Period Tests - Consider adding tests for different policy years to verify parameter effective dates work correctly.

  2. Reference Title Format - Some titles could be more specific (e.g., include section numbers like "Section 2100" instead of just manual name).


Validation Summary

Validator Issues
Regulatory Accuracy 0
Reference Quality 7 minor (PDF anchors)
Code Patterns 0
Test Coverage 1 gap (countable_income test)

Recommendation: Approve with minor fixes for PDF page anchors.


🤖 Generated with Claude Code

@PavelMakarchuk PavelMakarchuk merged commit ba6b958 into PolicyEngine:main Dec 28, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Mississippi TANF Program

2 participants