Methodological repair contract

This work implements the approved methodological review of GeoStep 0.3.0.

Invariants

  • A successful fit must have an estimable treatment contrast and finite inference.

  • Data content and declared windows determine results. Analysis results are not cached.

  • Parallel analyses use one outcome summary per eligible geo. Geos receive equal target weights; strata receive their population shares, not treatment-arm shares.

  • Assignment and strata stay fixed within a geo in parallel trials. Each analysis requires complete geo-by-observed-date coverage within the selected windows.

  • Lift is a difference of baseline-normalised changes, in fraction units. DiD and CRT effects remain in outcome units. No automatic relative lift or total volume.

  • Resampling preserves clusters, draw multiplicities and allocation restrictions.

  • Invalid data, unidentified effects and unavailable diagnostics cannot pass.

  • Numerical operations preserve float64. Settings and random seeds are explicit.

Intentional changes

Parallel DiD now compares geo-level pre/post changes. This gives equal geo weights and matches the old pooled interaction on a balanced panel. Stratified contrasts are weighted by the number of eligible geos in each stratum. The supported analytic procedure requires two geos per arm per stratum. Smaller strata are rejected rather than assigned an unsupported variance estimate.

Parallel uncertainty uses stratified Neyman variance and a Welch–Satterthwaite reference distribution. It is an approximation. Optional randomisation tests address the sharp null, condition on treatment counts within strata, and do not replace the approximate average-effect confidence interval. CRT retains OLS with calendar-period effects and clustered covariance, now with t(G-1) inference and explicit approximation warnings. It is not a mixed-effects model.

The unsupported Rosenbaum calculation is withdrawn. Advanced documentation must not represent illustrative or absent methods as validated package capabilities.

Verification plan

Regression tests reproduce each consequential review defect. Independent examples check contrasts against Welch tests, direct block-weighted calculations, exact allocation enumeration, and statsmodels CRT fits. A bounded seeded simulation checks parallel null rejection, bias, interval coverage, width and failure rates under additive effects, unequal variance, unequal strata and serially correlated outcomes. These checks do not establish universal calibration or causal validity.