Explanation
Background material for interpreting results, understanding model choices, and comparing GeoSC with other geo-experiment libraries.
Background material for interpreting results, understanding model choices, and comparing GeoSC with other geo-experiment libraries.
GeoSC is an end-to-end Python toolkit for planning, running, and interpreting geo-level marketing lift tests with SparseSC-backed synthetic control. It helps teams choose markets with data-driven donor evaluation and power analysis, estimate incremental impact, and produce decision-ready diagnostics, plots, and artifacts. It overlaps with several other geo-experiment libraries, but it is not a drop-in replacement for all of them.
This page is a methodology-level guide, not a live feature matrix. Upstream libraries change. Before choosing a tool for a production measurement program, check the current upstream documentation, licence terms, and supported runtime surface.
| Library family | Typical counterfactual | Inference style | Main fit |
|---|---|---|---|
| GeoSC | Sparse synthetic control from individual donor geos | SparseSC CIs when available, plus donor-pool placebo diagnostics | Python-first geo-lift workflows with market selection, power analysis, explicit artifacts, and donor diagnostics |
| Google geo-experiment tools, including GeoX/TBR/GBR/matched markets | Regression or matched-market designs using treatment/control aggregates or matched groups | Regression/Bayesian-style TBR uncertainty, depending on workflow | Regression-based geo experiments, matched-market design, and budget-constrained assignment |
| Meta GeoLift | Augmented synthetic control with prognostic outcome models | Conformal/placebo-style synthetic-control inference, depending on settings | End-to-end R workflow for market selection, power, GeoLift analysis, and plotting |
| General Bayesian causal-impact tools | Structural time-series or Bayesian synthetic-control model | Posterior intervals from the fitted model | Time-series impact analysis when a Bayesian model is the desired estimand |
Google’s geo-experiment literature and tools include time-based regression (TBR), geo-based regression (GBR), matched-market design, and related GeoX workflows. These methods are useful when the analyst wants an explicitly regression-based design and can defend the model form.
GeoSC differs in the counterfactual construction:
Operationally, this means GeoSC is usually more inspectable at the donor level: the analyst can review which donor geos were recommended or influential, whether the donor pool is concentrated, and whether placebo p-values are coarse. That does not make GeoSC automatically safer. If the donor pool is small, non-comparable, or exposed to spillovers, a sparse synthetic control can still be misleading.
Use Google-style TBR/GBR or matched-market tools when:
Use GeoSC when:
Meta GeoLift and GeoSC are closer methodologically than TBR/GBR because both are synthetic-control-oriented geo-experiment tools. The key difference is the synthetic-control variant.
Meta GeoLift is built around augmented synthetic control methods. The augmentation uses a prognostic outcome model, such as ridge regression or generalized synthetic control options, to improve the counterfactual when raw synthetic-control balance is imperfect. It also provides an end-to-end R workflow for market selection, power analysis, analysis, and plotting.
GeoSC uses SparseSC as its estimator backend. SparseSC regularizes the matching problem and uses cross-validation to select penalty settings. GeoSC wraps this with Python-native operational controls: data validation artifacts, assumption validation artifacts, donor evaluation outputs, power simulation metadata, and release-preflight checks.
The practical distinction:
GeoSC is not Bayesian and does not use PyMC. It does not produce posterior credible intervals, hierarchical meta-analysis estimates, or Bayesian structural time-series decompositions.
Bayesian causal-impact tools are useful when the analysis goal is to fit an explicit Bayesian time-series or Bayesian synthetic-control model and interpret posterior uncertainty under that model. GeoSC is useful when the analysis goal is SparseSC-based geo lift with donor-level diagnostics and production artifacts.
Do not pool or directly compare posterior effects from Bayesian tools with GeoSC’s ATT unless the estimand, scaling, time window, outcome definition, and measurement source are aligned.
GeoSC is designed to make production readiness demonstrable:
geosc power writes power_analysis_results.csv with simulation seeds,
failed-run counts, failure rates, effective placebo settings, backend fields,
and valid flags.geosc donors writes donor_eval_results.csv and
donor_pool_quality.json with quality bands, warning flags, and donor
concentration diagnostics.geosc infer writes geolift_results.json, geolift_diagnostics.json,
data_validation.json, and assumption_validation.json.status is explicit: ok, partial, or failed.selected_weight in donor evaluation is a design-stage recommendation and
concentration signal, not a fitted SparseSC donor weight.These are engineering and auditability features. They are not evidence that a specific experiment is causally valid.
Choose the tool based on the estimand and workflow, not the package name:
For any tool, treat small samples carefully. Placebo p-values are coarse when few eligible donor geos are available, and no software package can repair a non-comparable donor pool or contaminated experiment.
GeoexperimentsResearch API documentation.facebookincubator/GeoLift.assets/presentations/GeoX_vs_GeoLift_comparison/main.tex.Quick answers to the most common GeoSC questions.
A: GeoSC estimates the incremental impact of regional marketing campaigns under a synthetic-control design. It answers the practical question: “How much did observed outcomes differ from a SparseSC counterfactual for the treated geographies?” The estimate is only credible when the donor pool, treatment timing, measurement source, and spillover assumptions are defensible.
A:
A: No, GeoSC is one component of a comprehensive measurement strategy:
A: GeoSC does not estimate commercial ROI by itself. Cost and ROI depend on your license terms, campaign spend, margin assumptions, operational constraints, and whether the experiment produces a credible effect estimate. Use GeoSC’s statistical outputs as inputs to a separate business-case calculation.
A: GeoSC supports a three-stage workflow:
Elapsed time depends on data readiness, review requirements, donor-pool quality, and campaign complexity.
A: You need:
Data format: CSV with columns for date, geographic unit, outcome metric, and treatment information. The exact required columns and date format come from your YAML configuration.
A: Use the power-analysis command to assess duration and detectable effects:
This source-checkout example uses the shipped demo configuration. With a
packaged installation, supply your own configuration path instead. Review
power_analysis_results.csv for simulated power by duration and effect size,
including valid, failure_rate, and Monte Carlo uncertainty fields.
There is no universal duration that guarantees power. Longer post periods can help, but power also depends on outcome noise, effect size, donor comparability, placebo support, and campaign timing.
A: There is no fixed safe number. You need enough comparable, uncontaminated control geographies to support a useful synthetic counterfactual and placebo reference set. Use the donor evaluator to inspect candidate quality:
Outputs are saved in outputs/multicell_donor_eval/ (CSV with scores and donor maps).
A: Investigate the design before changing the estimator:
A: Common causes:
Check power analysis first to ensure the study design was capable of detecting the expected effect size.
A: Large effects can be real, but verify:
A: Confidence intervals show the range of effect sizes implied by the SparseSC placebo interval when the estimator returns finite bounds:
Example interpretation:
Read this as: “SparseSC returned a finite 95% placebo interval from +7.8% to +22.6% for this configured analysis.” It is not proof that the campaign-level causal assumptions hold.
A:
Both are important:
A: GeoSC reports statistical effect estimates (e.g. ATT, confidence intervals). ROI calculations depend on your business context (price, margin, cost). Combine effect estimates with your cost and unit economics to derive ROI externally.
A: Treat results as more credible when:
status is ok, data validation is clean, and required assumption checks
have passed.Be sceptical when:
status: partial or failed, missing uncertainty metadata, or failed
required assumption checksA small placebo p-value is evidence within the configured reference set, not a standalone proof of a campaign-level causal effect.
GeoSC produces a suite of statistical indicators to help determine the validity and magnitude of an experiment’s impact.
status: Result contract status. ok means the core ATT, p-value, and
uncertainty fields are available; partial means the estimate ran but one or
more uncertainty fields are unavailable; failed means required estimator
outputs are missing and the effect should not be interpreted.att (Average Treatment Effect on the Treated): The average difference between the observed outcome and the synthetic counterfactual during the post-treatment period.p_value: A donor-pool placebo p-value: the share of placebo effects at
least as extreme as the observed ATT under the implemented SparseSC placebo
comparison.ci_lower / ci_upper: The SparseSC placebo confidence interval for the unscaled ATT when available.se: Backward-compatible approximate SE derived from the reported
placebo confidence interval width. This is not an estimator-provided sampling
standard error.se_approx_from_ci: The same approximation exposed under an explicit
name. se_available remains false unless a future estimator provides a
true sampling SE.significant: Boolean flag indicating if the p-value falls below the
configured alpha threshold (usually 0.05) when significance_available is
true. Failed results always report significant: false.assumption_status: Summary of gate-eligible assumption checks.
skipped means the parallel-trends diagnostic was not completed, pass
means it did not fail, and fail or error means causal interpretation
needs review. It is not a certificate of causal validity.Placebo p-values are finite-sample and donor-pool dependent. With few eligible
donor units, p-values are coarse. Missing confidence intervals must not be
interpreted as zero uncertainty. Check ci.unavailable_reason to distinguish
disabled CI computation from missing or non-finite estimator outputs. Check
p_value_placebo_mode before relying on reproducibility: sampled means
SparseSC capped the placebo enumeration.
Use status, data_validation.json, and assumption_validation.json together.
status: "ok" means the artifact contract completed; it does not certify donor
comparability, absence of spillovers, or production safety. The advisory
interference screen is recorded in assumption_validation.json as signal,
no_signal, or indeterminate. It adds a caveat for a signal or indeterminate
screen, but does not alter result status or significance. Required
parallel-trends failures mark inference as failed.
Do not combine scaled diagnostics with unscaled ATT, or compare GeoSC ATT to revenue, platform-reported lift, or other measurement-source outputs, unless the estimands, units, and time windows have been harmonized upstream.
GeoSC provides raw lift estimates. It does not output built-in ROI or business-impact metrics (e.g., incremental revenue, ROAS). Use the statistical outputs (att) multiplied by your unit volumes and margin data in downstream reporting tools to calculate ROI.
This document provides a technical overview of the advanced features and mathematical concepts underlying GeoSC, focusing on how SparseSC is implemented and operationalised.
For a more rigorous econometric exposition intended for Data Scientists and Statisticians, see the Mathematical Formalism of Synthetic Controls.
The standard Synthetic Control Method minimises pre-treatment prediction error by constructing a convex combination of donor units.
GeoSC uses the vendored SparseSC implementation, which extends traditional synthetic control by learning a regularized match space and donor weights from the pre-treatment data.
Two objects are useful for interpretation:
V): Which pre-treatment features or
time periods matter most for matching.W): How control units combine to form the synthetic
counterfactual.SparseSC exposes penalties for unit-weight shrinkage (w_pen) and feature
weighting (v_pen). GeoSC’s default inference configuration uses SparseSC’s
fast path, which constructs the match space through RidgeCV-backed machinery in
the vendored implementation. The non-fast path uses SparseSC’s coordinate
descent and cross-validation over feature-weight penalties.
Regularization can reduce overfitting to pre-treatment noise and often produces more interpretable donor structure, but it does not make a weak donor pool valid. The result still depends on comparable controls, adequate pre-treatment support, and uncontaminated treatment timing.
Because regional marketing experiments typically involve a very small number of treated units (often just one), asymptotic statistical inference is usually not appropriate. GeoSC uses SparseSC placebo inference to compute empirical p-values and, when SparseSC returns finite bounds, placebo confidence intervals.
The primary method for significance testing is in-space placebo permutations.
This is a finite-sample comparison against the observed donor pool, not an unconditional production-safety guarantee. With few donors the p-value grid is coarse, and non-comparable geographies, spillovers, or poor pre-period fit can make the placebo reference set uninformative.
SparseSC selects penalty settings using cross-validation over pre-treatment information. The exact machinery depends on whether the configured run uses the fast path.
If the default automatic search does not yield a good fit, the configuration allows for direct intervention:
sparse_sc_fast_estimation: When set to true, GeoSC calls SparseSC’s
fast estimator. This uses a RidgeCV-backed match-space path and is generally
faster than the full coordinate-descent estimator. Treat any speed/accuracy
tradeoff as data-dependent.sparse_sc_model_type: Setting this to retrospective ensures the model adheres strictly to the pre/post treatment boundary defined in the configuration.By default, GeoSC includes all non-treated units in the donor pool. However, if business logic dictates that certain regions should not be used (e.g., they experienced a supply chain shock), they should be excluded from the input CSV entirely prior to analysis.
The recipes/donor_evaluator.py tool helps systematically identify the highest quality donors prior to running inference.
GeoSC relies heavily on matrix operations during the cross-validation and optimisation phases. The following options are supported to improve execution speed:
jobs: -1 (or pass --jobs -1 via CLI) to use all available CPU cores when simulating hundreds of treatment effects.--use-gpu to request it for performance-oriented
power runs. This requires cupy to be installed and matched to your system’s
CUDA version (e.g., pip install cupy-cuda12x). Seeded power runs disable GPU
DGP/generation paths so CPU simulation draws are reproducible.geolift.gpu_accelerator module is experimental compatibility code and is
not wired into the maintained inference pipeline. To avoid thread
oversubscription when running on multi-core servers, set environment variables
such as OMP_NUM_THREADS or MKL_NUM_THREADS to a sensible value relative to
your total core count.