* Stata scaffold: no observed data or estimates yet. clear all set more off * Export the cleaned analysis panel to panel.csv (UTF-8). import delimited using "panel.csv", clear encoding("utf-8") * Validate keys; do not drop duplicates automatically. isid muni_id year assert inrange(year,2022,2026) misstable summarize tab child_exp, missing * Check within-municipality exposure variation before FE estimation. bysort muni_id: egen exp_min = min(child_exp) bysort muni_id: egen exp_max = max(child_exp) gen exposure_changes = exp_min != exp_max if !missing(exp_min, exp_max) tab exposure_changes, missing * Prepare numeric muni_id and verified amounts/denominators first. * xtset muni_id year * gen prevention_share = prevention_budget/total_budget if total_budget>0 * xtreg prevention_share child_exp i.year, fe vce(cluster muni_id) * This baseline association is NOT proof of a causal pure effect. * 2022-2026: check whether exposure varies within locality. * No within variation => leader experience is absorbed by locality FE. * Analyze metropolitan and basic governments separately. * 2026 is incomplete. Do not compare partial-year spending with full years. * Preserve as_of_date, budget_stage, fiscal_year_complete and proposer/executor IDs.