Spatial spillovers and habit persistence in cigarette demand
When one US state raises its cigarette tax, smokers near the border may drive next door to buy cheaper packs. That cross-border shopping makes consumption in any state depend on its neighbours' prices, not just its own. Add the fact that smoking is highly persistent (τ ≈ 0.86), and the right model has to handle space and time at once — that is what SDPDmod does.
This app lets you turn the dials yourself. In four tabs you will watch a spatial shock ripple across a 1-D ring of states, simulate a spatial-dynamic panel and recover ρ and τ from the data, explore the post's real direct/indirect/total decomposition for the 46-state Cigar panel (1963–1992), and see how the spatial multiplier 1/(1−ρ) and temporal multiplier 1/(1−τ) jointly amplify policy shocks.
How a spatial shock spreads — the geometric series (I − ρW)−1
A spatial autoregressive (SAR) model implies that a 1-unit shock to one state's consumption echoes through its neighbours, then its neighbours' neighbours, in geometric powers of ρW. The animation below shows a 12-state ring where one state is hit by a unit shock; each frame plays one round of the geometric series. The orange total at each state at convergence is the column of (I − ρW)−1 — exactly the object that the post's impact decomposition uses.
Drag the ρ slider below to change the spillover intensity. With ρ near 0 the shock stays put. With ρ near 1 it propagates indefinitely and the column sum explodes — the spatial multiplier 1/(1−ρ) diverges.
Spatial-Dynamic Simulator
Set the true ρ, τ, and W·X spillover, simulate a 46×30 panel, and watch the static SDM and dynamic SDM each try to recover them.
Effect Decomposition
The post's headline forest plot. Toggle effect type (direct/indirect/total) and horizon (static vs short-run vs long-run) for price and income.
Multiplier Explorer
Slide ρ and τ to see how the spatial multiplier 1/(1−ρ) and temporal multiplier 1/(1−τ) blow up the short-run effect into the long-run.
Glossary (open a card if a term is unfamiliar)
Spatial weight matrix W
Spatial autoregressive coefficient ρ
SAR vs SDM vs SEM
Lee-Yu bias correction
Habit persistence τ
Direct effect
Indirect (spillover) effect
Long-run multiplier 1/(1−τ)
Spatial-dynamic simulator — set the truth, recover it
The data-generating process is a spatial dynamic panel: yt = ρWyt + τyt−1 + βxt + φWxt + αi + γt + εt on a 12-state ring (queen contiguity). You set the true (ρ, τ, β, φ). The app fits a non-spatial FE model, a static SDM, and a dynamic SDM, and reports each one's parameter recovery so you can see which models bias which parameters.
Non-spatial Two-way FE
Ignores W. The model most applied researchers would start with.
Static SDM (TW FE, LY)
Adds ρWy and WXθ. No temporal lag.
Dynamic SDM (TW FE, LY)
Full model: ρWy + τyt−1 + WXθ.
What to look for
- Crank τ up. When habit persistence is strong, the static SDM's β̂ becomes badly biased because the omitted yt−1 term is collinear with the spatial lag. Only the dynamic SDM recovers β.
- Crank ρ up. The non-spatial FE absorbs spatial dependence into β̂, inflating its magnitude. The static SDM partially fixes this; the dynamic SDM fully does.
- Set φ ≠ 0. Only the SDM specifications include W·x. The non-spatial FE will miss it entirely, biasing β̂ in proportion to φ.
- Shrink T. Watch how all estimators degrade. Short panels need the Lee-Yu correction.
Effect decomposition — the post's headline forest plot
These numbers come straight from the post's static-SDM and dynamic-SDM impact decompositions for the 46 US states. Toggle effect type (direct / indirect / total) and variable (price / income) to compare. Hover any point to see its SE and 95% CI. The interesting story is the sign reversal of the indirect price effect between the static SDM (−0.22) and the dynamic short-run (+0.18) — that is the cross-border shopping signal that the static model misses.
Variables
Effect type
Model / horizon
What to look for
- Sign-flip of the indirect price effect. Static SDM: −0.22 (negative spillover). Dynamic short-run: +0.18 (positive — cross-border shopping). The static model conflates spatial and temporal effects.
- Long-run effects are huge but imprecise. The dynamic long-run direct price elasticity is −1.93 — nearly 2× the static SDM — but the indirect and total long-run estimates have very wide CIs.
- Income is more robust. The direct income elasticity is positive and significant in every specification (0.10 short-run → 0.59 static → 0.80 long-run). Cigarettes are a normal good.
- Short-run total price effect is essentially zero. Direct (−0.26) is offset by Indirect (+0.18), leaving Total at −0.08, not significant. Cross-border shopping cancels the within-state effect in the short run.
Why the sign reversal? Cross-border shopping in one minute
When state i raises its price, two things happen in opposite directions. Inside state i, fewer packs are sold (the direct negative effect). Outside state i, neighbouring residents who used to cross the border away now stop — and own-state residents may cross toward a neighbour with lower prices. The static SDM, with no time dimension, ties the spatial lag of price to current neighbour-consumption (which fell because of the spatial multiplier), producing a negative indirect effect. The dynamic SDM, by contrast, lets yt−1 absorb the spatial-multiplier contagion and leaves the W·logp coefficient to reflect the true behavioural channel — cross-border purchasing — which is positive.
Multiplier explorer — how ρ and τ inflate a policy shock
A 1% price hike does not stay where you put it. Spatial spillovers propagate it across neighbours (multiplied by 1/(1−ρ)), and habit persistence accumulates it over time (multiplied by 1/(1−τ)). The two multipliers combine to translate a tiny short-run elasticity into a much bigger long-run one — the source of the post's headline −0.26 short-run vs −1.93 long-run contrast.
What to look for
- τ = 0.864 gives a multiplier of ≈ 7.4. A one-period direct effect of −0.27 grows to ≈ −2.0 in the long run — close to the post's −1.93 estimate.
- ρ matters less than τ. With ρ = 0.16, the spatial multiplier is only 1/(1−0.16) ≈ 1.19. The temporal multiplier dominates.
- Slide τ to 0. Long-run and short-run collapse to the same number — the static SDM regime.
- Slide ρ above 0.9. The spatial multiplier diverges, illustrating why ρ must stay below 1 for the model to make sense.
The general formula for the dynamic spatial multiplier
The full long-run impact matrix for a one-unit change in x across all states is (1 − τ)−1 · (I − ρW)−1 · (βI + φW). The diagonal of that matrix gives the long-run direct effect; the row-sums minus the diagonal give the long-run indirect. The temporal factor 1/(1−τ) is what makes the post's long-run elasticities so much larger than the static ones — and the off-diagonals of (I − ρW)−1 are what produce non-zero spillovers even when φ = 0.