{
  "file": "data/turnout_model/gg26/composition_factors.csv",
  "description": "Composition change factors per county x party group (DEM, REP, OTH = ALL - DEM - REP), logit scale: comp = factor_age + factor_new, added by the forecast to each cell's linear predictor. n26 is the cell's current registrants (the weight for centring); R22 and R26 are the cell's expected 2022-midterm participation under its 2022 and 2026 age mix; s22, s26 the recent-registrant shares; rho the relative 2026-primary propensity of people registered since the 2024 general, rho_gen = sqrt(rho) its general-election version. county = Maryland rows are statewide per party from summed cell counts, for reporting only.",
  "generated_by": "scripts/turnout_model/03_compose.R",
  "run_date": "2026-10-17T17:26:03-0400",
  "sources": {
    "table": "skipjack.db voter_file_counts",
    "snapshot_date": "2026-08-12",
    "metrics": {
      "turnout_by_age": "county x age band (age today): 2022-GG count / eligible shifted to age on 2022 election day, 2026-GP count / eligible; k_c(a) = 2022-GG eligible / 2026-GP eligible",
      "turnout_by_age_party": "statewide party x age band: party tilt t_p for 2022-GG (shifted, factor_age) and 2026-GP (rho)",
      "age_by_party": "county x party x age band, all statuses: the 2026 mix e26 and, scaled by k and shifted, the 2022 mix",
      "party_by_county": "county x party x status: cell totals (active + inactive) for the e26 reconciliation and as the share denominators",
      "registration_cohorts": "county x party x reg_year: 2019-2022 and 2023-2026 counts",
      "new_voters_voted": "county x party: registered after 2024-11-05 and eligible for 2026-GP, count voted / eligible",
      "new_registrants": "county x party x age at registration (18-22, 23-29, 30+) x reg_year, first-time registrants: reg_year 2025-2026 age profile"
    }
  },
  "source_ids": [],
  "checks_passed": [
    "the age shift keeps every current band's mass",
    "shift_map sends current 18-24 wholly to 18-24 (ages 22-24 -> 18-20)",
    "shift_map sends current 25-34 0.4 to 18-24 and 0.6 to 25-34",
    "shift_map sends current 75+ 0.2 to 65-74 and 0.8 to 75+",
    "shift_map sends no mass below age 18",
    "every county x age-at-2022 band has a 2022-GG rate (count 0 rates are 0)",
    "shifted 2022-GG eligible below age 18 is under 0.5% of each county's eligible",
    "statewide Unknown-age eligible is equal for 2022-GG and 2026-GP",
    "every derived OTH = ALL - DEM - REP is non-negative (e26, tilt counts, party_by_county, registration_cohorts, new_voters_voted)",
    "turnout_by_age_party 2022-GG DEM/REP/ALL unsuppressed",
    "turnout_by_age_party 2026-GP DEM/REP/ALL unsuppressed",
    "every cell x age band 18-24 to 75+ has a tilted rate",
    "party_by_county totals (active + inactive) are unsuppressed for every cell",
    "age bands of age_by_party (with Under 18; suppressed bands as 1-9) sum to the cell's party_by_county total",
    "where no band is suppressed, age_by_party bands sum exactly to the party_by_county total",
    "only Unknown-age bands of e26 are suppressed",
    "k_c(a) in (0, 1.05] for every band in use",
    "no 2022 mix mass below age 18",
    "factor_age for 72 cells, every band in use has a rate",
    "factor_age is 0 (to 1e-9) in every cell when the 2026 mix is 3 x the shifted 2022 mix",
    "factor_age is positive in every cell when 10% of the 2022 mix's 18-24 mass moves to 65-74",
    "registration_cohorts carries no NULL reg_year rows (the metric excludes them)",
    "registration_cohorts 2019-2026 counts are unsuppressed for DEM, REP and ALL",
    "shares for 72 cells",
    "statewide NULL reg_year registrants (party_by_county minus registration_cohorts) are under 0.1% of registrants",
    "county registration_cohorts sums fall short of party_by_county totals by suppressed old years plus at most the statewide NULL reg_year count",
    "new_voters_voted eligible is positive for DEM, REP and ALL",
    "county new_voters_voted DEM and REP sum to the statewide rows",
    "county ALL new-registrant age profiles are unsuppressed",
    "rho inputs for 48 DEM/REP cells and 24 county ALL rows",
    "county ALL rho is computable everywhere",
    "72 cell rows with no NA in comp",
    "|comp| <= 0.25 for every cell",
    "s22 and s26 in (0, 1)",
    "rho > 0",
    "statewide rows have comp"
  ],
  "notes": {
    "method": {
      "factor_age": "Age-at-election terms with one propensity schedule, computed by factor_age_of(). Each current-age band's counts are spread uniformly over its single years (18-24: 7 years, 25-34 to 65-74: 10, 75+ treated as 75-94), shifted back 4 years and re-binned into the standard bands by age on 2022 election day. The snapshot (2026-08-12) is 3.75 years after the 2022 general and 0.23 years before the 2026 general, so an exact 4-year shift puts both mixes about 0.24 years before their own election: consistent between them. r22_c(b) = shifted 2022-GG count / shifted eligible (turnout_by_age, county); t_p(b) the same ratio for the party over ALL from shifted turnout_by_age_party; r22_cp(b) = r22_c(b) * t_p(b), capped at 0.99. e22_cp(b) = shift(age_by_party_cp(a) * k_c(a)), with k_c(a) = 2022-GG eligible / 2026-GP eligible by county x current-age band: this keeps each party's own age profile, where splitting the county's shifted eligible by party would need a county party x age split the file does not give for 2022. e26_cp(b) = age_by_party in current bands (today's age is close to age on 2026-11-03). R22 = sum e22 r22 / sum e22, R26 = sum e26 r22 / sum e26, A = logit(R26) - logit(R22). Under 18 dropped; Unknown kept as its own band, unshifted. Tests in the script: shift_map() unit checks; A = 0 to 1e-9 in every cell when e26 is 3 x the shifted e22; A > 0 in every cell when 10% of e22's 18-24 mass is moved to 65-74.",
      "age_shift_18_24": "Deviation from a uniform spread: 2022-era quantities in the current 18-24 band (2022-GG count and eligible, and the 2022 mix age_by_party * k) are spread over current ages 22-24 only. Nobody younger than about 21.75 today was 18 by 2022-11-08, which 2022-GG eligibility requires, and k for 18-24 (about 0.40, near 3/7) agrees. A uniform 18-24 spread would place 4/7 of the band's 2022-GG eligible below age 18: 1.79% to 3.01% of a county's eligible, above the 0.5% tolerance. With the 22-24 spread the mass below 18 is zero by construction (checked under 0.5% per county).",
      "factor_new": "N = logit(R26 * (1 - (s26 - s22) * (1 - rho_gen))) - logit(R26), argument clamped to [1e-6, 1 - 1e-6]. factor_new is a bonus (positive) in every cell, because s26 < s22 everywhere: the 2019-2022 cohort, with the 2020 registration surge, is a larger share of those registered by 2022 than the 2023-2026 cohort is of today's registrants. factor_new_rho1 (rho_gen = 1) is 0 by construction; factor_new_rho_raw uses the primary rho itself and is the larger bonus.",
      "rho": "DEM and REP: observed 2026-GP rate of new_voters_voted over the age-expected rate, sum over bands of the cell's 2025-2026 new-registrant age profile times the cell's 2026-GP rate (county x age rate times the statewide 2026-GP party tilt): 18-22 -> 18-24, 23-29 -> 25-34, 30+ -> the cell's 35+ average weighted by its current registrants (an approximation). OTH: statewide DEM/REP pooled rho (sum of observed over sum of expected counts across the DEM/REP cells with unsuppressed counts), since closed primaries make OTH primary rates meaningless. Fallbacks if a cell's count were suppressed: county ALL (untilted rates), then statewide ALL; rho_source records which was used. Statewide DEM and REP rows pool the same way.",
      "rho_gen": "rho_gen = sqrt(rho) is a judgment: primaries exaggerate the gap between new and established voters, so the general-election propensity of new registrants is taken halfway (on the log scale) between rho and 1. factor_new_no_penalty uses rho_gen = 1, factor_new_full_penalty rho_gen = rho.",
      "habit_mix": "No habit-mix factor: metric voter_types classifies each voter over the elections they were eligible for in this one snapshot, so there is no 2022-era counterpart to compare with. factor_new is the measurable part of the habit shift."
    },
    "limitations": {
      "factor_age_survivors": "Known residual bias, not corrected: the 2022 mix is built from today's file, so people who died or moved since 2022 are missing from it. Deaths remove high-propensity elderly voters, which understates R22 (and pushes factor_age up); moves remove low-propensity young voters, which overstates R22 (and pushes factor_age down). The net sign is unknown. The file holds about 87% of the 2022 electorate, so the missing 13% is large next to the factor.",
      "k_not_party_specific": "k_c(a) is by county x age only, so each party's 2022 mix assumes the same share of each age band was registered in time for 2022. OTH, where unaffiliated registration has grown fastest, has the least reliable 2022 age profile.",
      "current_party": "Party means current party in both mixes: voters who switched party since 2022 are counted in their current party's 2022 mix.",
      "rho_expected_includes_new": "rho's age-expected rate comes from 2026-GP rates of everyone in the county x age band, the new registrants themselves included, which pulls the expected rate toward theirs and rho toward 1.",
      "rho_ages": "rho's age-expected rate uses 2026-GP rates by current age: the primary (2026-06-23) is seven weeks before the snapshot, so current age is age at that election. The new-registrant profile bands are age at registration in 2025-2026, at most about 1.6 years younger than current age.",
      "s22": "Recent cohorts lose more members to moves, so in today's file the 2019-2022 cohort is understated relative to its size in 2022: s22 is understated and factor_new is biased toward a larger penalty. A known limitation, not corrected.",
      "participation_among_current_voters": "All rates and shares are ratios within the 2026-08-12 snapshot, which holds about 87% of the 2022 electorate; never levels.",
      "profile_mismatch": "new_voters_voted counts everyone with a state registration date after 2024-11-05 (including 16-17 year-old preregistrants and November-December 2024 registrants), while the age profile comes from new_registrants, first-time registrants aged 18+ at registration in reg_year 2025-2026, whose bands are age at registration rather than age today. The profile is an approximation of the age mix of the rho population."
    },
    "deviations": {
      "registration_cohorts_null_reg_year": "registration_cohorts excludes NULL reg_year rows (the pipeline filters them), and its oldest years are sometimes suppressed. Share denominators therefore use the cell's party_by_county total (active + inactive), which includes NULL reg_year registrants; s22's denominator is that total minus the 2023-2026 counts, so NULL reg_year registrants count as registered by 2022. Statewide, NULL reg_year registrants number 42 (party_by_county minus registration_cohorts, both unsuppressed statewide).",
      "rho_party_tilt": "The brief's age-expected 2026-GP rate for a county x party cell uses turnout_by_age, which has no party; the county x age rate is tilted to the party with the statewide 2026-GP party x age rates, as factor_age does for 2022-GG, so that DEM and REP rho compare like with like (all-party primary rates include unaffiliated voters who cannot vote in them).",
      "e26_reconciliation": "age_by_party has no total row; its bands (with Under 18) are reconciled to party_by_county totals, exactly where no band is suppressed and within the 1-9 bounds of suppressed bands otherwise.",
      "unknown_age": "The Unknown age band has a 2022-GG count of 0 in every county (rate 0, observed even where eligible is suppressed) and, statewide, equal 2022-GG and 2026-GP eligible counts, so k = 1 in every county. Where a cell's Unknown e26 is suppressed (1-9 people) or not derivable, the band is left out of that cell's mixes and of n26; with rate 0 and equal weight in both mixes its effect on factor_age is under 1e-4.",
      "unknown_age_dropped_cells": ["Anne Arundel:DEM", "Baltimore County:DEM", "Charles:DEM", "Howard:DEM", "Kent:DEM", "St. Mary's:DEM", "Washington:DEM", "Worcester:DEM", "Allegany:REP", "Anne Arundel:REP", "Howard:REP", "Prince George's:REP", "Allegany:OTH", "Anne Arundel:OTH", "Baltimore County:OTH", "Charles:OTH", "Howard:OTH", "Kent:OTH", "Prince George's:OTH", "St. Mary's:OTH", "Washington:OTH", "Worcester:OTH"]
    }
  },
  "statewide_pooled_dem_rep_rho": 0.6031,
  "statewide_all_rho": 0.5183,
  "statewide_null_reg_year_registrants": 42,
  "shift_years": 4,
  "age_shift_map": [
    {
      "age_band": "18-24",
      "band22": "18-24",
      "w": 1
    },
    {
      "age_band": "25-34",
      "band22": "18-24",
      "w": 0.4
    },
    {
      "age_band": "25-34",
      "band22": "25-34",
      "w": 0.6
    },
    {
      "age_band": "35-44",
      "band22": "25-34",
      "w": 0.4
    },
    {
      "age_band": "35-44",
      "band22": "35-44",
      "w": 0.6
    },
    {
      "age_band": "45-54",
      "band22": "35-44",
      "w": 0.4
    },
    {
      "age_band": "45-54",
      "band22": "45-54",
      "w": 0.6
    },
    {
      "age_band": "55-64",
      "band22": "45-54",
      "w": 0.4
    },
    {
      "age_band": "55-64",
      "band22": "55-64",
      "w": 0.6
    },
    {
      "age_band": "65-74",
      "band22": "55-64",
      "w": 0.4
    },
    {
      "age_band": "65-74",
      "band22": "65-74",
      "w": 0.6
    },
    {
      "age_band": "75+",
      "band22": "65-74",
      "w": 0.2
    },
    {
      "age_band": "75+",
      "band22": "75+",
      "w": 0.8
    },
    {
      "age_band": "Unknown",
      "band22": "Unknown",
      "w": 1
    }
  ],
  "shifted_2022_below_18_max_share": 0,
  "uniform_spread_2022_below_18_share_range": [0.0179, 0.0301],
  "factor_new_positive_cells": 72,
  "new_registrant_profile_fallbacks": ["Caroline:DEM", "Dorchester:DEM", "Dorchester:REP", "Garrett:DEM", "Garrett:REP", "Kent:DEM", "Kent:REP", "Queen Anne's:DEM", "Queen Anne's:REP", "Somerset:DEM", "Somerset:REP", "Talbot:DEM", "Talbot:REP", "Worcester:DEM"],
  "columns": {
    "n26": "the cell's current registrants aged 18+ (age_by_party, all statuses; suppressed Unknown-age bands left out): the weight for centring comp",
    "R22": "expected 2022-GG participation under the cell's 2022 age mix (ratio within the snapshot)",
    "R26": "the same under the 2026 age mix",
    "factor_age": "logit(R26) - logit(R22)",
    "rho": "2026-GP propensity of registrants since the 2024 general relative to their age-expected rate",
    "rho_gen": "sqrt(rho): judged general-election propensity (see notes)",
    "s22": "share of registrants by end of 2022 who registered 2019-2022",
    "s26": "share of current registrants who registered 2023-2026",
    "factor_new": "new-registrant factor with rho_gen = sqrt(rho); a bonus in every cell because s26 < s22 (the 2020 registration surge)",
    "factor_new_rho1": "sensitivity with rho_gen = 1 (new registrants vote like established voters of their age): 0",
    "factor_new_rho_raw": "sensitivity with rho_gen = rho (the primary propensity itself): the larger bonus",
    "comp": "factor_age + factor_new",
    "rho_source": "where rho came from"
  }
}
