Spatial Inverse Probability Weighting (Spatial IPW)

Statistics
Introduced by
Extension of Rosenbaum & Rubin (1983) IPW to spatial settings; formal treatment by Papadogeorgou et al. (2019)
Year
2010s
Type
Quasi-experimental / causal inference
Family
Quasi-experimental / causal inference

What does it do?

Spatial Inverse Probability Weighting extends the classical IPW estimator to settings where units are geo-referenced and spatial location may confound the treatment effect.

The propensity score model includes geographic information, such as coordinates or spatial lags, so that the weighted sample aims to balance treatment groups on measured covariates and on spatial structure. It is intended for spatially indexed observational data where a causal estimate must be defended against location-driven selection.

The intuition behind the method

Standard IPW upweights under-represented units and downweights over-represented ones so the reweighted sample resembles a randomised experiment. When data carry geographic coordinates, location can itself be a confounder: treated and control units may cluster in different regions with different baseline risks or exposures. Spatial IPW lets the propensity score model absorb this information through coordinates, spatial lag variables, or area-level covariates, so that the weights balance the groups across space as well as across individual characteristics. A unit in a high-treatment-density area is therefore reweighted to stand in for units elsewhere that share its location-driven treatment tendency.

History

Inverse probability weighting rests on the result that adjusting for the propensity score removes bias from differences in measured covariates. Rosenbaum and Rubin (1983) established this, as described in Hirano, Imbens and Ridder (2003). Hirano et al. further showed that weighting by the inverse of a nonparametric estimate of the propensity score yields an efficient estimate of the average treatment effect. Spatial versions extend this framework by adding geographic information to the propensity model. Papadogeorgou, Choirat and Zigler (2019) developed distance adjusted propensity score matching (DAPSm), which incorporates spatial proximity into a propensity score matching procedure. The method was motivated by a comparative effectiveness study of power plant emission reduction technologies and ambient ozone exposure. DAPSm is a matching method rather than a weighting estimator, so it is related to, but distinct from, Spatial IPW.

When to use it

Use Spatial IPW when you have geo-referenced observational data and suspect that geographic location confounds the treatment-outcome relationship, for example when industrial facilities cluster in certain regions, environmental exposures follow spatial gradients, or policy adoption spreads between neighbouring areas. It is appropriate when you can measure or proxy the spatial confounding signal and include it in the propensity model. Do not use it as a substitute for randomisation when hidden spatial confounders remain unmeasured and cannot be proxied; in that case, consider spatial instrumental variables or regression discontinuity designs based on geographic boundaries. It is also a poor fit when treatment in one location plausibly affects outcomes in nearby locations, because the interference violates the assumptions IPW relies on.

Limitations and considerations

  • Adjusts only for spatial confounding captured by the included features; spatial heterogeneity that is neither measured nor proxied remains a source of bias.
  • Adding many spatial variables to the propensity model can produce extreme weights, and trimming or stabilisation used to control them can itself introduce bias.
  • Spatial standard errors (HAC or spatial cluster-robust) require choosing a bandwidth, cluster definition, or spatial weight matrix, and the reported uncertainty can depend on that choice.
  • Geographically weighted propensity estimation is computationally demanding for large spatial datasets.
  • Does not handle interference: if treatment in one location affects outcomes in neighbouring locations, the standard estimator does not recover a clean causal effect.
  • Identification rests on conditional unconfoundedness given the included spatial features, positivity (propensity scores strictly between 0 and 1, with overlap in every region), and the absence of interference between units. Hirano, Imbens and Ridder (2003) state the unconfoundedness condition on which this estimator depends.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Adjusts for spatial confounding that standard IPW leaves in place when location predicts both treatment and outcome, provided the relevant spatial features are included in the propensity model.
  • Spatial information can enter the propensity model in several forms (coordinates via basis functions, distance to a focal point, spatial lag of the treatment, area-level aggregates), so the analyst can match the form to the suspected confounding pattern.
  • Because the weights come from the propensity model, the method can be combined with an outcome regression in a doubly robust estimator, which gives some protection if either model is misspecified.
  • Flexible propensity models, such as gradient boosting with spatial features, can capture irregular geographic patterns without imposing a fixed functional form.

Applications

  • Estimating the health effects of air pollution or industrial emissions when facilities cluster geographically and nearby residents differ systematically from distant ones.
  • Evaluating place-based economic policies (enterprise zones, tax incentives) where treated and control regions differ spatially in pre-existing trends.
  • Assessing conservation interventions (protected areas, reforestation) whose placement is spatially non-random relative to biodiversity or deforestation outcomes.
  • Studying the causal impact of urban infrastructure (transit lines, hospitals) when infrastructure location reflects spatial planning priorities.
  • Epidemiological studies of neighbourhood-level exposures (food deserts, green space, noise) where residential sorting creates spatial selection bias.

How it works

How it works

1

Estimate the probability that each unit receives treatment given its measured covariates and its spatial attributes (coordinates, regional indicators, spatially lagged exposure, or distance to a focal point). Common tools include logistic regression with spatial terms, geographically weighted logistic regression, and nonparametric spatial smoothers.

Formula
e(\mathbf{x}_i, \mathbf{s}_i) = P(T_i=1 \mid \mathbf{x}_i, \mathbf{s}_i)
2

Augment the covariate vector with spatial features that capture location-driven confounding: centroid coordinates, distance to emission sources or treatment facilities, spatial lag of the treatment, or area-level socioeconomic indices. This step is what distinguishes spatial IPW from plain IPW. If the relevant spatial features are omitted, the spatial confounding they carry remains in the propensity model's error and can bias the estimate.

3

Compute IPW weights from the estimated propensity score: for the ATE, treated units receive 1/e and controls receive 1/(1-e), as in the formula above. For the ATT, controls are weighted by e/(1-e) and treated units by 1. Stabilised weights, which multiply by the marginal treatment probability, are a common variant that reduces variance. The estimator given in mechanics uses the unstabilised form, so a stabilised analysis requires the corresponding modified expression.

Formula
w_i = \frac{T_i}{e(\mathbf{x}_i,\mathbf{s}_i)} + \frac{1-T_i}{1-e(\mathbf{x}_i,\mathbf{s}_i)}
4

The average treatment effect is estimated as the weighted difference in mean outcomes between treated and control units, using the expression above. A weighted regression of the outcome on treatment with the IPW weights is a common way to compute this difference, but the two agree exactly only under particular weighting and variance conventions. Doubly robust variants add an outcome regression model to the weights, which gives some protection if either model is misspecified.

Formula
\widehat{\tau}_{\text{ATE}} = \frac{1}{n}\sum_{i=1}^{n} w_i\, T_i\, Y_i - \frac{1}{n}\sum_{i=1}^{n} w_i\,(1-T_i)\,Y_i
5

Standard errors must account for spatial autocorrelation in the residuals. Options include cluster-robust standard errors at a geographic unit (county, grid cell), spatial HAC standard errors, and bootstrap methods that preserve spatial structure. Each requires a choice, such as a cluster definition or bandwidth, and the appropriate option depends on how dependence is expected to decay with distance. Ignoring spatial dependence understates uncertainty when nearby units share common shocks.

Common pitfalls

  • Entering raw longitude and latitude linearly in a logistic regression often fails to capture the spatial confounding pattern; spatial basis functions or a flexible nonparametric model are usually needed.
  • If treated units affect nearby control units (for example through pollution drift or disease spread), the no-interference assumption required by IPW is violated, and the estimate mixes direct and indirect effects rather than isolating one of them.
  • Reporting standard errors that ignore spatial autocorrelation in the residuals overstates precision and inflates the rate at which null effects are rejected.
  • Applying spatial IPW when treatment assignment is driven mainly by unmeasured geographic factors, such as historical zoning decisions absent from the data, without a sensitivity analysis for hidden spatial bias.
  • Regions where treatment is nearly certain or nearly absent yield propensity scores close to 0 or 1, so the weights become very large and the estimate depends on extrapolation. Check overlap region by region before interpreting the pooled estimate.

Frequently asked questions

How is Spatial IPW different from standard IPW?

Standard IPW includes only individual-level measured covariates in the propensity model. Spatial IPW additionally incorporates geographic information (coordinates, spatial lags, distance measures, or area-level variables) to absorb confounding that arises from the geographic clustering of treatment. Without this, standard IPW can produce biased estimates whenever location is both a predictor of treatment and an independent predictor of the outcome.

What spatial features should I include in the propensity model?

Include any geographic variable you believe drives both treatment assignment and the outcome independently: centroid coordinates (possibly via splines or basis functions), distance to a focal facility or boundary, spatial lag of the treatment, or aggregate area-level characteristics such as population density or an income index. The goal is to make treatment assignment conditionally independent of location, given the included features.

How do I handle extreme IPW weights in a spatial setting?

Use stabilised weights, which place the marginal treatment probability in the numerator: P(T=1)/e(x, s) for treated units and P(T=0)/(1-e(x, s)) for controls. Consider trimming or truncating the most extreme weights at a percentile you choose and report, then test how sensitive the estimate is to that choice. In spatial settings, extreme weights often cluster geographically; inspect their spatial distribution, since concentrated extreme weights signal that the propensity model is extrapolating across regions with very different treatment propensities.

What if treatment in one location affects outcomes in nearby locations?

Spatial interference (spillover) violates SUTVA, which IPW requires. In this case, consider interference-robust estimators that define treatment as a function of the neighbourhood exposure level, or spatial panel methods that explicitly model spillovers. Standard Spatial IPW will conflate direct and indirect treatment effects.

Which software can implement Spatial IPW?

General-purpose R and Python tools can be combined for the main steps: a propensity weighting package such as WeightIt in R, with spatial diagnostics from spdep or spatialreg; or scikit-learn for propensity estimation with spatial features, together with PySAL for spatial diagnostics in Python. Check that each package supports the specific spatial specification you need, since general-purpose tools do not necessarily implement every step of this workflow. The key steps (spatial feature engineering, propensity estimation, weight construction, weighted outcome regression, and spatial standard errors) can each be implemented modularly in either language.

Related methods

Sources

  1. Hirano, K., Imbens, G. W., & Ridder, G. (2003). Efficient Estimation of Average Treatment Effects Using the Estimated Propensity Score. Econometrica, 71(4), 1161-1189.

    Open DOI reference
  2. Papadogeorgou, G., Choirat, C., & Zigler, C. M. (2019). Adjusting for unmeasured spatial confounding with distance adjusted propensity score matching. Biostatistics, 20(2), 256-272.

    Open DOI reference