Skip to content

docs: check the survey-year rule against the 2009 stimulus (#77) - #5

Merged
jknowles merged 1 commit into
mainfrom
claude/great-knuth-4jky3n-issue-77-arra
Nov 4, 2026
Merged

jknowles merged 1 commit into
mainfrom
claude/great-knuth-4jky3n-issue-77-arra

Conversation

@jknowles

@jknowles jknowles commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Gitea issue #77 (Refs #77; step 4 remains open)

Result

The 2009 stimulus (ARRA, signed February 17, 2009) is a second natural experiment for the state-government rule in R/fiscal.R, after the CARES Act in survey year 2020.

  • Alabama, Michigan and Texas state governments: the documented rule fits again. Survey year Y is the fiscal year ending in calendar year Y.
  • Large September-30 cities and counties: they again follow the plain rule.
  • D.C.: inconclusive again.

The data agrees with the code, so the rule and .SURVEY_YEAR_SAME_YEAR_GOVIDS are unchanged. Only the evidence statements in the docs change.

Data

IG Federal revenue (category = "IG Federal") from the public API, corpus build 2026-10-26T22:13:24Z, pipeline fccd87c, schema 7:

  • GET /api/v1/revenue?type=state&years=2006,...,2011&category=IG%20Federal&format=csv&limit=50000
  • GET /api/v1/governments/112001124214/revenue?years=2006,...,2011&category=IG%20Federal (D.C.)
  • GET /api/v1/revenue?govid=<15 ids>&years=2006,...,2011&category=IG%20Federal&format=csv&limit=50000

I added survey year 2006 to give one more pre-stimulus baseline.

State governments and D.C.:

FYE 2006→07 2007→08 2008→09 2009→10 2010→11
Alabama 930 +2.4% −8.0% +18.0% +18.5% −4.7%
Michigan 930 +4.8% +2.7% +22.2% +17.5% +3.9%
Texas 831 +1.2% +9.7% +12.3% +20.6% +4.3%
New York 331 −2.7% −1.9% +12.8% +16.4% +8.2%
D.C. (type 2) 930 +5.1% +8.3% +4.1% +15.9% −0.9%
June-30 states, median (46) 630 +2.3% +3.6% +12.4% +17.5% +3.6%
June-30 states, p25–p75 −0.1 to +5.2% +0.4 to +7.1% +8.7 to +17.8% +12.9 to +21.8% +0.5 to +5.8%

15 large September-30 local governments: San Antonio, Dallas, Austin, Fort Worth, Jacksonville; Miami-Dade, Broward, Palm Beach, Hillsborough, Orange FL, Pinellas, Bexar, Tarrant, Dallas County, Travis. All are 930 in the fixture's FY2011, FY2012, FY2019 and FY2020. Fort Worth has no FY2006–FY2007 rows.

2006→07 2007→08 2008→09 2009→10 2010→11
Median growth +1.5% +1.4% +2.1% +3.1% +17.7%
Governments above +25% 4 2 3 2 7

What each rule predicts

For a September-30 state government:

Survey year Documented rule: fiscal year ending in Y Plain rule: fiscal year ending July 1, Y-1 to June 30, Y
2009 Oct 2008–Sep 2009: about seven and a half months after enactment, plus the enhanced Medicaid match retroactive to October 2008 → jump Oct 2007–Sep 2008: entirely before the stimulus → baseline
2010 Oct 2009–Sep 2010: full year of stimulus Oct 2008–Sep 2009 → jump
2011 Oct 2010–Sep 2011: enhanced match phased down from January 2011 and ended June 30, 2011 → slowdown Oct 2009–Sep 2010: full year of stimulus, against a 2010 that had only about seven and a half months of non-Medicaid stimulus grants → continued growth

Texas (August 31) is the same, one month earlier.

  • Alabama and Michigan jump in 2009 (+18.0%, +22.2%). Their 2007→08 growth was −8.0% and +2.7%, and the June-30 states' was +3.6%. They slow in 2011 (−4.7%, +3.9%), with the June-30 states (+3.6%). Both signatures fit the documented rule; neither fits the plain rule.
  • Texas jumps in 2009 (+12.3%) and slows in 2011 (+4.3%). Same reading, with a confounder noted below.
  • New York (March 31) is not a usable control here, unlike in 2020. Its survey-year 2009 runs April 2008–March 2009, which includes the six weeks after enactment and the retroactive Medicaid match back to October 2008. It shows +12.8% in 2009 under either rule.
  • The September-30 local governments jump in 2011 (median +17.7%). That year is their fiscal year ending September 30, 2010 under the plain rule; the documented rule would place the same fiscal year in survey year 2010, where the median is +3.1%.
  • D.C. fits neither rule cleanly.
    • 2009 is flat (+4.1%), below its own +8.3% the year before. That leans plain.
    • 2010 jumps (+15.9%), which fits both rules.
    • 2011 falls (−0.9%). That leans documented.

What else could move these numbers

I looked at these before relying on the comparison.

  • Enhanced Medicaid matching (FMAP). It was retroactive to October 1, 2008, ran to December 31, 2010, and was phased down to June 30, 2011 by Public Law 111-226. Under the documented rule the retroactive quarters fall inside the 2009 period, and under the plain rule inside 2010, so the retroactivity sharpens the contrast rather than blurring it. I could not confirm when the retroactive amounts were actually paid. That is what makes New York ambiguous.
  • Recession-driven Medicaid and other caseload growth from 2008 raises federal matching everywhere, gradually. It would add a few points to both rules' 2009 and 2010, not +18% to +22% in a period (October 2007–September 2008) that ended before most of the downturn.
  • Alabama's 2007→08 dip (−8.0%). Part of its 2009 jump could be a rebound. Its 2011 decline (−4.7%) does not depend on that.
  • Hurricane Ike (September 2008) and Texas. FEMA aid to Texas would fall in its September 2008–August 2009 period and could inflate the 2009 jump. Under the plain rule, Texas's 2009 ends August 31, 2008, before Ike, so post-Ike aid still points to the documented period. Not checked.
  • Michigan's unemployment, if federal unemployment-related funds are counted in IG Federal, could add to its 2009–2010 growth. Not checked.
  • Uneven grant timing. The education stabilization fund, highway and other stimulus grants were drawn down at different speeds by different governments. This mostly affects magnitudes.
  • Local data are noisy. Bexar, Pinellas, Travis and Fort Worth swing by hundreds of percent in some years, which looks like coding or reporting changes. I used the median and a count above +25% for that reason.

What changed

Docs only; no code. The rule and .SURVEY_YEAR_SAME_YEAR_GOVIDS are untouched.

  • R/fiscal.R, header comment: cites both survey years for the state rule and says D.C. was inconclusive in both.
  • R/fiscal.R, "The survey-year rule" roxygen section: "the corpus agrees in survey year 2020, the one year checked" becomes "survey years 2009 and 2020, the two years checked". "That treatment has not been checked against the data" (D.C.) becomes "Checks against the 2009 and 2020 data were inconclusive for it, so that treatment rests on the documentation alone."
  • man/cog_fiscal_periods.Rd, man/cog_survey_year.Rd: regenerated with roxygen2 7.3.3, which matches RoxygenNote. DESCRIPTION is untouched.
  • Checks: tests/testthat/test-fiscal-period.R passes locally (85 expectations) on a scratch copy with the usual offline httpfs patch, and tools::checkRd() is clean on both pages.

Verified

  • Every growth figure in the tables, computed from the API responses above (build 2026-10-26, fccd87c).
  • The 15 local governments' fiscal_year_end (930) in FY2011, FY2012, FY2019 and FY2020, from the fixture.
  • Medicaid match dates: retroactive to October 1, 2008; original end December 31, 2010; extended and phased down to June 30, 2011. From CRS RL32950, the Oregon Health Authority and the 2010 Federal Register notice. I found these through web search extracts and could not open the pages.
  • The state and D.C. exceptions, quoted from Census's 2006 technical documentation in the earlier PR.

Not verified

  • fiscal_year_end for FY2006–FY2010. I assumed the state governments, D.C. and the 15 local governments kept the values seen in FY2011 onward. Census documentation gives the same four state year ends in 2004, 2006 and 2022.
  • When the retroactive Medicaid money was paid, and so whether New York's +12.8% reflects it.
  • Whether Hurricane Ike aid or Michigan's unemployment funds sit in IG Federal for these years.
  • Which federal fiscal year had the largest stimulus outlays. I could not find a source, so the plain rule's 2011 prediction rests on timing alone, not on a measured peak.
  • D.C.'s rule, still on documentation alone after two inconclusive tests.
  • Any survey year other than 2009 and 2020.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5

A second natural experiment for the state-government rule in R/fiscal.R,
using IG Federal revenue from the public API (corpus build 2026-10-26,
fccd87c), survey years 2006-2011:

- Alabama and Michigan (September 30) and Texas (August 31) jump in
  survey year 2009 (+18.0%, +22.2%, +12.3%) and slow in 2011 (-4.7%,
  +3.9%, +4.3%), as the June 30 states do (median +12.4%, +3.6%). Under
  the plain rule their 2009 would end in 2008, before the stimulus, and
  their 2011 would be the full stimulus year.
- 15 large September-30 cities and counties jump in 2011 (median +17.7%,
  against +2.1% and +3.1% in 2009 and 2010), as the plain rule predicts.
- D.C. is inconclusive again: its 2009 is flat (+4.1%), like the plain
  rule, but its 2011 falls (-0.9%), like the documented one.

The data agrees with the code, so the rule and
.SURVEY_YEAR_SAME_YEAR_GOVIDS are unchanged. The header comment and the
"survey-year rule" section now cite survey years 2009 and 2020 for the
state rule and say D.C. was inconclusive in both. man/ regenerated with
roxygen2 7.3.3.

Refs #77

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Thanks for this — and one thing worth knowing before it happens.

This repository is a mirror. Development happens on Gitea at
gitea.civilytics.org/Civilytics/uscogdata. Your pull request will be fetched
from here, landed there, and synced back.

Because that merge preserves your commits at their original SHAs, GitHub will
mark this pull request "Merged" on its own
— without anyone visibly clicking
the Merge button, and possibly without a review comment on this page first.

If your pull request closes as "Merged" and nobody appears to have merged it,
that is the normal, successful outcome — not a rejection.

If it is not going to be merged, you will get an actual reply saying so.

Substantial contributions get a ctb entry in DESCRIPTION, which surfaces in
citation("uscogdata"). There is no CLA and no DCO sign-off.

Full details: CONTRIBUTING.md.

@jknowles
jknowles merged commit 5b1a68b into main Nov 4, 2026
5 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.

2 participants