Explanation

Subsections of Explanation

Causal Estimand and Identification

GeoSC reports an unscaled average post-period treated-minus-counterfactual difference. Calling it causal requires more than estimator completion.

For treated set \(\mathcal{T}\) and measured post periods \(\mathcal{P}\), the target can be written conceptually as

$$ \tau = \frac{1}{|\mathcal{P}|} \sum_{t \in \mathcal{P}} \left(\bar{Y}_{\mathcal{T}t}(1)-\bar{Y}_{\mathcal{T}t}(0)\right). $$

The observed treated outcome supplies \(\bar{Y}(1)\). SparseSC estimates the unobserved \(\bar{Y}(0)\) from eligible donor outcomes.

A causal interpretation needs a stable outcome definition; treatment timing and assignment measured correctly; donors unaffected by treatment; no uncontrolled geography-specific shock aligned with launch; adequate pre-period support for the counterfactual; and an estimand whose geography and period match the business question. These conditions are design arguments, not outputs of the optimiser.

GeoSC’s parallel-trends diagnostic can be required as an operational gate, but passing it does not prove exchangeability. The interference screen is advisory and has no exposure model. Power addresses detection under a simulated DGP, not identification. State each evidence source separately.

Cooldown, Seasonality, and Anticipation

Cooldown excludes observed periods between launch and measurement. It is useful when response builds gradually, attribution matures, or short-term launch noise is outside the estimand. It also removes data and can reduce power.

GeoSC counts observed periods. With daily data, cooldown_periods: 7 excludes seven observed days; missing dates make that different from seven calendar days. The resolved analysis window is persisted in validation and result artefacts.

Cooldown does not fix anticipation. If customers or media respond before the declared launch, the pre-period is contaminated. Move the intervention boundary only when the behavioural timing supports it, not to improve fit.

Power’s native CLI does not apply the inference cooldown resolver. Set the power split and simulated duration to represent the actual measurement design, and document the translation.

Historical data should cover comparable seasonal conditions. The factor VAR(1) DGP has no explicit day-of-week, holiday, or campaign-season terms. A long but non-comparable history can be worse than a shorter seasonally relevant window; use pre-specified sensitivity checks.

Design Rejection

GeoSC should reject or defer a design when the requested causal statement is not supported. At minimum, stop when:

  • treatment, outcome, geography, or measurement window is unresolved;
  • treatment exposure cannot be separated from donors;
  • the panel cannot satisfy the explicit data contract;
  • no substantively eligible donor pool remains;
  • pre-period fit is materially inadequate or dependent on an implausible donor;
  • placebo support cannot resolve the pre-specified alpha;
  • power is inadequate for the commercially plausible effect range;
  • simulation failures or DGP sensitivity make MDE unstable;
  • required assumption checks fail or inference status is failed;
  • conclusions reverse under small, equally defensible specifications.

Some failures can be repaired by changing geography, outcome, history, duration, or eligibility. That creates a new design and requires a new power assessment. If no repair is defensible before treatment, document the experiment as descriptive or infeasible. A forced estimate is not a more helpful answer.

Donor Quality

Donor quality has two distinct meanings in GeoSC.

The donor stage measures pairwise pre-period similarity. Correlation captures co-movement; RMSE and MAPE capture level error; normalised DTW captures temporal shape. Composite scores are relative within each treated geography and support screening. They do not estimate final counterfactual weights.

Inference measures joint synthetic-control fit. Several individually modest donors can combine well, while a highly correlated donor can receive little weight. Review fitted pre-period error and the SparseSC weight distribution.

Strong screening scores do not establish donor exchangeability. Eligibility also requires no treatment exposure, comparable outcome measurement, and no post-launch shock that differentially moves the donor. Conversely, poor overlap, incomplete metrics, concentrated recommendation weights, or weak joint pre-fit are direct reasons to reconsider the design.

Donor selection must be outcome-blind with respect to the measured post period. Changing the pool after seeing lift invalidates ordinary interpretation unless the search and multiplicity are explicitly modelled.

Frequently Asked Questions

Is a donor the same as a control?

A donor is an eligible control geography that can contribute to a synthetic counterfactual. In code, power calls all non-treatment units controls. Preserve the eligibility distinction in design documentation.

Do donor recommendations flow into inference?

No. The pipeline runs stages independently. Filter and version the panel if the donor screen changes the eligible universe, then rerun affected stages.

Is GeoSC power simulation-based?

Yes. It estimates a factor-VAR DGP from the pre-period, simulates post-periods, injects effects, calls SparseSC, and counts p-values below alpha. It is more computationally intensive than a closed-form MDE but not automatically more accurate.

Does power use the complete inference workflow?

No. It uses the SparseSC estimator and detection rule inside simulation but has a narrower configuration and does not run inference data policies, cooldown, assumption gates, or result processing.

Why can estimated power decrease at a larger effect or duration?

Finite Monte Carlo estimates can fluctuate. Large reversals can also indicate failures, coarse placebo support, a weak DGP, or specification sensitivity. Increase simulations and investigate; do not label an empirical rolling-window diagnostic a theoretical monotonic power curve.

What does MDE mean here?

For a duration, it is the smallest valid effect on the tested grid reaching configured target_power. It is not expected campaign lift and is not interpolated.

How is a relative effect injected?

GeoSC multiplies one pooled mean across treated units and all pre-periods by the relative effect, then adds the same absolute path to each treated unit.

What does valid mean in power output?

At least one simulation succeeded and failure rate did not exceed the threshold. It says nothing about DGP plausibility or causal identification.

What is the top-level inference p-value?

It is a two-sided, add-one-corrected in-space placebo p-value for the absolute average post-period effect. It is not a post/pre MSPE-ratio p-value.

Can a small donor pool produce significance?

Only at the resolution allowed by its effective placebo count. The smallest step is 1 / (n_placebos + 1) under the implemented calculation.

Does status: ok prove the campaign caused lift?

No. It means the software result contract completed. Identification depends on eligibility, isolation, measurement, timing, pre-fit, and sensitivity evidence.

Does GeoSC calculate ROI or iROAS?

No. Combine a defensible incremental outcome with campaign cost and the correct commercial value or margin definition downstream.

Does GeoSC support GPU inference?

No. Optional CuPy work is limited to supported unseeded power DGP paths. Seeded power and main SparseSC inference are CPU-based.

Method Comparisons

Compare estimands and decision rules before comparing numbers.

Method family Counterfactual Typical uncertainty Main diagnostic focus
GeoSC SparseSC-weighted individual donors In-space placebo effects and intervals Joint pre-fit, donor weights, placebo support, simulation diagnostics
Google TBR/GBR and matched-market workflows Time-based regression on aggregated treatment and control signals Model-based intervals; design power depends on the implementation Stable treatment-control relationship, match quality, model form, assignment constraints
Meridian GeoX Randomised or stratified assignment with TBR inference at the documented launch boundary Product-specific Randomisation, balance, TBR stability, and delivery integrity
Meta GeoLift Augmented synthetic control with generalised synthetic-control components Conformal and package-specific procedures L2 imbalance, augmentation model, market selection, test fit
Bayesian causal-impact tools Structural time-series counterfactual Posterior distribution Prior/model fit and posterior predictive behaviour

GeoSC’s native power module is simulation-based, but that does not imply a TBR or GeoX MDE is necessarily analytic; implementations vary. GeoSC repeatedly simulates a factor-VAR post period, injects effects, and calls SparseSC. A TBR workflow may use a fitted treatment-control regression, residual variance, analytic formula, resampling, or simulation.

Before comparing MDEs align outcome and transformation, treatment geography, control eligibility, pre-period, measurement and cooldown windows, lift denominator, effect pattern, alpha, target power, one- or two-sided rule, failure handling, and whether placebo assignments are sampled. Before comparing effects align the estimand, scale, aggregation, and uncertainty interpretation.

A material discrepancy is a diagnostic. Decompose it rather than averaging the answers or assuming the larger MDE is conservative. GeoSC is useful when individual donor diagnostics, Python operation, and auditable artefacts matter; it is not automatically superior to a well-specified regression design.

Primary method references

These references describe their respective implementations. They do not imply that an internal or modified workflow uses the same defaults.

Multi-Treatment Designs

GeoSC supports several treated geographies, but interpretation and computation change.

The top-level effect is joint across the treated set; it is not a separate ATT for each geography. Placebo assignments must contain the same number of control units as the treated set, giving \(\binom{N_0}{N_1}\) possible assignments. SparseSC work can grow rapidly, so sparse_sc_max_n_pl may trigger sampling.

Power injects the same absolute effect path into every treated unit, based on the pooled treated pre-period mean. This is not unit-specific proportional lift. When treated units have very different outcome levels, supplement the standard run with a carefully labelled sensitivity analysis or avoid describing the injected effect_size as each unit’s own percentage lift.

Confirm that all treated units share a defensible launch and measurement window. Staggered adoption requires a distinct design argument; do not coerce it into a single-date configuration without defining the resulting estimand.

Placebo Inference

GeoSC uses SparseSC in-space placebo inference because geo experiments often have too few treated units for conventional large-sample approximations.

For each treated-sized subset of eligible controls, SparseSC constructs an honest placebo effect. The top-level p-value compares the absolute average treated effect with the absolute average placebo effects and applies an add-one correction. It is two-sided.

When feasible assignments exceed sparse_sc_max_n_pl, SparseSC samples assignments using sparse_sc_placebo_seed; otherwise it enumerates them. The result reports the possible and effective counts and labels the mode exact, sampled, or unknown.

Finite support matters. With \(M^*\) effective placebos the nominal resolution is \(1/(M^*+1)\). If this exceeds alpha, significance at that alpha cannot be attained. Sampling adds reference-set variability even when the optimiser is stable; preserve the seed.

The p-value is calibrated only relative to the placebo assignment logic and its exchangeability assumptions. Non-comparable donors, spillover, differential measurement changes, or poor pre-fit can make a numerically small p-value misleading. SparseSC placebo intervals are likewise finite-reference-set quantities, not model-free guarantees.

Power and MDE Methodology

GeoSC power is a simulation-based design diagnostic. For effect \(e\) and duration \(d\), it estimates

$$ \widehat{Power}(e,d) = \frac{\text{successful simulations with }p < \alpha} {\text{successful simulations}}. $$

Failed simulations are excluded from the denominator and reported separately. A row is valid only when at least one simulation succeeds and its failure rate does not exceed power_failure_rate_threshold. Validity does not assert that the DGP or design assumptions are credible.

Implemented workflow

For every effect-duration grid point, GeoSC:

  1. pivots the long CSV to a unit-by-period matrix;
  2. uses periods before treatment_date as the fixed observed pre-period;
  3. demeans each unit, fits an SVD factor model, and estimates factor dynamics;
  4. simulates a post-period panel;
  5. computes one baseline as the mean across all treated units and all pre-periods;
  6. multiplies that pooled baseline by effect_size and applies the resulting same absolute effect path to every treated unit;
  7. appends simulated post data to the observed pre-period;
  8. calls SparseSC with treated periods at the split and counts results.p_value < alpha.

This denominator means a configured 10% lift is relative to the pooled treated pre-period mean. It is not a separate 10% of each treated unit’s own baseline. The output records the baseline and full absolute injection.

The power loop uses the SparseSC estimator and its top-level placebo p-value, but it is not identical to geosc infer. It does not run inference’s panel policies, cooldown resolver, assumption checks, CI configuration, result processor, or full SparseSC config surface. “Same inference path” is therefore too strong; align panels and settings explicitly.

Effect patterns

  • constant and immediate: full absolute effect in every simulated period;
  • ramp: linear sequence from zero to full effect, inclusive;
  • decay: full effect followed by \(\exp(-0.1t)\) decay;
  • any other value: configuration error.

The 0.1 decay rate is not configurable in version 0.3.0.

Grid-based MDE

For duration \(d\) and target power \(q\), GeoSC reports the smallest valid tested effect that reaches the target:

$$ MDE_d = \min\{e \in \mathcal E: valid(e,d),\ \widehat{Power}(e,d) \geq q\}. $$

target_power defaults to 0.80 in the CLI and pipeline but is configurable. No interpolation is performed. If no effect reaches the target, MDE is above the tested range.

Monte Carlo uncertainty

The CSV includes a Wilson interval around the estimated detection proportion. Its confidence setting uses the configured alpha. This interval describes finite simulation uncertainty, not DGP misspecification, donor-selection uncertainty, or future-campaign uncertainty. If it straddles target power, increase n_simulations before making a threshold decision.

Worked output

duration effect_size power interval failure_rate valid
28 0.05 0.42 0.36–0.48 0.00 true
28 0.10 0.76 0.71–0.81 0.00 true
28 0.15 0.91 0.87–0.94 0.00 true
35 0.10 0.84 0.79–0.88 0.00 true
42 0.10 0.89 0.85–0.92 0.25 false

At 80% target power, the 28-period grid-based MDE is 15% and the 35-period MDE is 10%. The 42-period row is excluded despite high estimated power.

Power is computationally intensive because total work scales approximately with effect sizes × durations × simulations × SparseSC fit and placebo cost. This differs from a closed-form regression MDE, but computational intensity is not by itself evidence of better calibration.

Power DGP Assumptions

GeoSC estimates its power data-generating process (DGP) from the pre-period outcome matrix.

Each unit is demeaned. Singular value decomposition produces factor loadings and factor scores. When rank is automatic, GeoSC chooses the first rank reaching about 80% cumulative singular-value variance, bounded by power_dgp_max_rank and a short-panel VAR feasibility cap. It then estimates a VAR(1) intercept, transition matrix, and Gaussian innovation covariance on the factor series.

Simulation draws the initial factor state from the estimated marginal normal distribution; it is not conditioned on the final observed factor state. Later states follow the fitted VAR(1). Outcomes combine fixed unit loadings, simulated factors, stored unit means, and independent Gaussian idiosyncratic noise with one pooled residual standard deviation.

Consequences:

  • cross-unit dependence is represented through common factors;
  • lag-one factor dependence is represented;
  • calendar seasonality is not modelled explicitly;
  • the fitted VAR transition is not constrained to be dynamically stable;
  • idiosyncratic variance is homoskedastic across units and periods;
  • non-Gaussian tails, structural breaks, intermittent zeros, and conditional start-state dynamics may be poorly represented;
  • rank selection is a heuristic, not cross-validated DGP truth.

Validate simulated moments and time-series behaviour against the use case. Run sensitivity to history, rank, effect pattern, and eligible controls. If design decisions change materially, report DGP dependence rather than one definitive MDE.

SparseSC Estimator

GeoSC’s only implemented estimator selector is sparsesc. SparseSC learns a regularised match space and donor weights from pre-treatment outcomes and optional covariates.

Conceptually, it chooses unit weights \(W\) and match-space weights \(V\) to reduce treated-versus-synthetic pre-period discrepancy subject to regularisation:

$$ (\widehat W, \widehat V) = \arg\min_{W,V} \left|Y^{pre}{\mathcal T}-Y^{pre}{\mathcal C}W\right|_V^2

  • \mathcal P_W(W) + \mathcal P_V(V). $$

This is an explanatory simplification, not a line-by-line restatement of every vendored optimisation path. With sparse_sc_fast_estimation: true, GeoSC calls the vendored fast path, which uses RidgeCV-backed match-space machinery. The full path uses SparseSC’s penalty search and coordinate-descent machinery.

Regularisation controls overfit; it does not make an ineligible donor valid. Inspect pre-fit, fitted unit weights, weight concentration, and sensitivity to substantive donor exclusions. The selected_weight from GeoSC’s donor stage is not \(\widehat W\); fitted weights are exposed in inference diagnostics.

The package vendors a pinned, locally governed SparseSC fork. See Vendored Dependencies for provenance.

Spillover, Contamination, and Concurrent Media

Synthetic control requires the donors to represent untreated outcomes. This can fail when audience delivery crosses boundaries, national media reaches both groups, travellers move between geographies, retail or supply changes differ by region, or another campaign starts near treatment.

Concurrent activity is not automatically fatal. A national or business-as-usual channel can be part of the baseline if its effect and delivery are sufficiently common across treated and donor geographies. Differential delivery correlated with treatment is the problem. Record channel, dates, spend or delivery where available, targeting logic, and expected geographic reach.

GeoSC’s interference screen compares outcome behaviour and can return signal, no_signal, or indeterminate. It has no exposure model and cannot establish whether media caused the pattern. Use campaign logs, geographic delivery data, and domain evidence. Keep the screen advisory.

If contamination is material and cannot be represented or excluded, reject the design or change the estimand. Do not reinterpret contaminated donors as valid because pre-period fit was good.

Synthetic-Control Formalism

Let \(Y_{it}\) be the outcome for unit \(i\) and period \(t\). Let \(\mathcal{T}\) denote treated units, \(\mathcal{C}\) eligible donors, and \(T_0\) the last pre-treatment period after any window resolution.

For one treated unit, a synthetic counterfactual has the form

$$ \widehat{Y}_{1t}(0) = \sum_{j \in \mathcal{C}} w_j Y_{jt}. $$

Weights and the match space are estimated from pre-treatment information. The period effect is

$$ \widehat{\tau}_t = Y_{1t} - \widehat{Y}_{1t}(0), $$

and GeoSC’s top-level unscaled ATT is the average of that effect over measured post periods:

$$ \widehat{\tau} = \frac{1}{T_1}\sum_{t=T_0+1}^{T_0+T_1}\widehat{\tau}_t. $$

The implementation also supports multiple treated units. SparseSC constructs a joint treated effect and an in-space placebo reference set formed from treated- sized subsets of controls. With \(N_0\) controls and \(N_1\) treated units, the exhaustive assignment count is

$$ M = \binom{N_0}{N_1}. $$

GeoSC’s top-level p-value is not a post/pre mean-squared prediction-error ratio. If \(\widehat{\tau}^{(m)}\) is the average placebo effect for assignment \(m\), SparseSC uses the two-sided absolute-effect comparison with add-one correction:

$$ p = \frac{1 + \sum_{m=1}^{M^*} \mathbf{1}\left\{|\widehat{\tau}^{(m)}| \geq |\widehat{\tau}|\right\}} {M^*+1}, $$

where \(M^*\) is the effective exhaustive or sampled placebo count. The finest attainable step under this calculation is \(1/(M^*+1)\). The result is an empirical comparison against the eligible placebo assignments; its causal meaning depends on the design.