Why spatial panel models? Cigarettes do not stop at state lines.
When a state raises its cigarette tax, consumers near state borders may simply drive across to buy cheaper cigarettes next door. Cross-border shopping makes each state's consumption depend not only on its own prices and income but also on those of its neighbours. Ordinary panel models — pooled OLS, region FE, two-way FE — treat each state as independent and miss this spatial spillover.
The Baltagi cigarette panel covers 46 US states across 1963–1992 (n = 1,380). The post estimates a Spatial Durbin Model (SDM) with ρ̂ = 0.265 and an indirect price effect (−0.314) almost as large as the direct one (−0.313). This app lets you turn the dials yourself. Watch a price shock propagate through a spatial multiplier; trade habit persistence (τ) against spatial dependence (ρ) in a dynamic SDM; and explore the post's full direct/indirect/total table interactively.
The spatial-multiplier intuition
Both ρ (spatial lag of y) and τ (temporal lag) amplify a shock
relative to its bare coefficient. The animation below sweeps a penalty
knob (here, the spatial autoregressive parameter) from zero to one. The
orange curve mimics the SDM-type
multiplier 1 / (1 − ρ) behaviour (amplifies);
the steel dashed curve shows the
complementary direction (compression as the penalty grows).
Cross-Border Spillover
Drop a price hike on a 7×7 lattice of "states". Watch the spatial multiplier (I − ρW)−1 propagate it to neighbours and neighbours' neighbours. Vary ρ — see the 0.27 SDM world versus a near-unit world.
Dynamic SDM Simulator
Trade habit persistence τ against spatial dependence ρ. Generate fake panel data on a 7×7 lattice with known τ, ρ, and θ. See why adding τ ≈ 0.65 collapses ρ̂ from 0.27 to 0.08.
Direct / Indirect / Total Effects
The post's headline numbers as a forest plot. Toggle models (Pooled OLS, FE, SDM, dynamic SDM) and regressors (logp, logy). See why non-spatial models understate price sensitivity by 57%.
The three key takeaways this app is built around
- Non-spatial models understate price sensitivity. Two-way FE gives a price elasticity of −0.402; SDM total effect is −0.627 — a 57% increase. The difference is the cross-border spillover ignored by standard panel models. The OLS-vs-SDM gap is the cross-border-shopping channel made visible.
- The SDM cannot be simplified. All three Wald tests reject the simpler models: SAR (χ² = 12.87, p = 0.002), SLX (χ² = 61.04, p < 0.001), SEM (χ² = 8.49, p = 0.014). Cigarette consumption spills across borders through three channels at once: neighbours' consumption (ρ), neighbours' prices (θlogp), and neighbours' income (θlogy).
- Habit persistence dominates dynamics. Adding the temporal lag τ collapses ρ̂ from 0.265 to 0.080 and produces τ̂ = 0.654 — about 65% of last year's smoking persists. The static SDM conflates temporal and spatial dynamics. Short-run elasticity drops to −0.15; long-run is approximately −0.42 = −0.15 / (1 − 0.64).
Glossary (open a card if a term is unfamiliar)
Spatial Durbin Model (SDM)
ρ (rho) — spatial autoregressive
τ (tau) — temporal lag
ψ (psi) — spatiotemporal lag
W — spatial weight matrix
Direct effect
Indirect (spillover) effect
Total effect = direct + indirect
Lee-Yu bias correction
Wald tests for SDM restrictions
Short-run vs long-run elasticity
Cross-Border Spillover — watch the price hike propagate
A 7×7 lattice of "states" (49 cells, in the same spirit as the 46-state
US panel). Click any cell to drop a unit price hike on it. The animation
spreads it through a row-standardised rook spatial weight matrix at rate
ρ. After many iterations, the system stabilises at
(I − ρW)−1 times the initial shock. Slide ρ to
feel the gap between the SDM's ρ̂ = 0.27 and a near-unit-root world.
Click any cell to drop a unit price-hike shock
Heat colour shows the steady-state change in consumption per state. Brighter = stronger spillover received from the shocked state.
What to look for
- At ρ = 0, the price hike stays in the originating state. No cross-border response. This is the world non-spatial FE assumes.
- At ρ = 0.27 (the static SDM estimate), the shock bleeds visibly into the 4 contiguous neighbours, then decays geometrically. The amplification
1 / (1 − ρ) ≈ 1.37matches the SDM's direct/own-coefficient gap (−0.313 / −0.307 ≈ 1.02 once spatial lags of X are accounted for). - At ρ = 0.08 (the dynamic SDM estimate), the spatial map is much darker. Spillovers are real but small once habit persistence is controlled for. The static model overstates them by absorbing temporal autocorrelation.
- At ρ ≥ 0.8, every cell lights up. The entire panel becomes a single interconnected system. The cigarette panel is decisively not in this regime.
Dynamic SDM Simulator — trade τ against ρ
Simulate panel data on a 7×7 lattice (n = 49 "states", T = 30 years) with known true habit persistence τ, spatial autoregression ρ, and a price-lag spillover θ. Then estimate ρ̂ back from a misspecified static SDM that ignores τ. Watch ρ̂ inflate as the true τ grows — the static SDM's bias absorbs habit persistence into the spatial parameter. This is the §8 finding of the post made visible.
Truth what we simulated
Estimates what each model recovers
Pedagogical estimators on simulated data — concentrated profile likelihood for ρ on a grid. Not as accurate as Stata's xsmle, but the bias pattern is the same.
What to look for
- Set τ = 0 and ρ = 0.27: data is purely cross-sectional in dynamics. Both static and dynamic SDM recover ρ ≈ 0.27. No bias from omitting the temporal lag.
- Set τ = 0.65 and ρ = 0.08: the post's regime. The static SDM should now estimate ρ̂ inflated toward ~0.25 — it absorbs the τ-driven inertia into the spatial parameter. The dynamic SDM separates them correctly.
- Set τ = 0.85 and ρ = 0: a purely habit-driven world with no genuine spatial spillover. The static SDM will still produce a large ρ̂ — it has nowhere else to put the temporal correlation. This is the §8 false-positive trap.
- Read the gap stat: the larger the gap between static and dynamic ρ̂, the worse the static model misspecifies the dynamics. In the cigarette panel, the gap is about 0.18 (0.265 − 0.080).
The post's headline numbers — interactively
These estimates come straight from the post — §4 (Pooled OLS, Region FE, Time FE, Two-way FE), §6 (SDM standard and SDM with Lee-Yu bias correction), and §8 (Dynamic SDM with τ alone and with both τ + ψ). The y-axis lists the eight models. The facets are the three impact components: direct, indirect (spillover), and total. Toggle which models and which regressor (logp or logy) to display.
What to look for
- Toggle non-spatial models (Pooled OLS, Region FE, Time FE, Two-way FE): notice that the indirect-effect facet is uniformly zero. These models have no cross-border channel by construction. The Total facet then equals the Direct facet for every non-spatial row.
- Compare Two-way FE and SDM on logp: two-way FE gives −0.402 (direct = total); SDM gives total = −0.627. The 57% understatement is the cross-border-shopping channel ignored by FE. This is the headline finding of §6 and §9.
- SDM vs SDM (Lee-Yu): nearly identical (ρ: 0.265 vs 0.260; total logp: −0.627 vs −0.623). With T = 30 the incidental-parameter bias is small. The Lee-Yu correction is a robustness check rather than a substantive correction here.
- Static SDM vs dynamic SDM on logp: static SDM direct = −0.313; dynamic SDM (with τ) direct = −0.152 — half the size. Dynamic indirect drops from −0.314 to −0.082 (and loses significance). The static SDM's spillover estimates partly capture omitted temporal dynamics.
- For logy (income): non-spatial Region FE estimates a tiny insignificant 0.013; SDM total = +0.36; dynamic SDM total = +0.11. Once habit persistence is controlled, the income elasticity nearly halves.
Regressor
Models to display
Why does the SDM amplify the price effect but the dynamic SDM shrink it?
In the static SDM, a price hike in state i propagates to neighbours through (I − ρW)−1 and partly echoes back. The direct effect (−0.313) includes the echo, and the indirect effect (−0.314) captures the cross-border response. Total = −0.627, much larger than two-way FE's −0.402 because the FE model has no spatial channel.
In the dynamic SDM, much of what looked like spatial dependence is actually habit persistence — τ̂ ≈ 0.65 — that happens to cluster temporally and spatially because neighbour states are autocorrelated within. Once τ enters the model, ρ̂ collapses from 0.265 to 0.080. The short-run direct effect halves (−0.152), and the long-run effect (β / (1 − τ) = −0.152 / 0.36 ≈ −0.42) matches the static SDM's number from a completely different mechanism: contemporaneous spatial spillover vs. own habit persistence over time.
The Wald-test verdict (post §7)
Three tests, three rejections — the SDM cannot be simplified:
- SAR restriction (θ = 0): χ²(2) = 12.87, p = 0.002. Neighbours' prices and incomes have direct effects beyond their influence through Wy.
- SLX restriction (ρ = 0): χ²(1) = 61.04, p < 0.001. The spatial autoregressive feedback is overwhelmingly significant.
- SEM common-factor restriction (θ + ρβ = 0): χ²(2) = 8.49, p = 0.014. Spatial dependence is substantive, not just nuisance error.
Three independent statistical tests all reject the simpler model. The full SDM is the appropriate specification — cigarette demand spills across borders through multiple channels simultaneously.