Bayesian estimation of spatial weight matrices — and what changes when you stop assuming
Nagoya University (GSID)
August 4, 2026
You have the transcript of the dinner.
You do not have the seating chart.
Spatial econometrics hands you the chart first — and asks you to trust it.
\[y_t = \rho W y_t + Z_{t-1}\beta + \varepsilon_t\]
If the map is wrong, every number downstream is wrong.
Ten of ninety European NUTS-1 regions have no queen-contiguity neighbour at all:
Cyprus · Malta · Aegean islands · the Canaries · Åland · Corsica · Sicily & Sardinia · Azores · Madeira · Ireland
You patch each one by hand before the model will run.
None of those patches appears in the results table.
| Assumed \(W\) | Estimated \(W\) | |
|---|---|---|
| \(\rho\), \(\sigma^2\) | 2 | 2 |
| Slopes | 4 | 4 |
| Off-diagonal cells | 0 | 8,010 |
| Total unknowns | 6 | 8,016 |
| Observations | 1,710 | 1,710 |
| Obs per unknown | 285 | 0.21 |
4.7 parameters per observation — the likelihood alone cannot do this.
\[p_{ij} \;\propto\; \omega_{ij} \;\times\; m(k_i)\]
Where links can be \(\times\) how many there are.
The trap: a “non-informative” flat prior expects 44.5 neighbours per region.
Every region wired to half of Europe.
At n = 90 the flat and default priors expect 44.5 neighbours per region; only the shrinkage prior expects a sparse network.
The word “non-informative” describes the weight you type, not the belief you assert.
A link is on or off, so conditional on everything else there are only two states to score:
\[p(\omega_{ij} \mid \Omega_{-ij}, \cdot, \mathcal{D}) \sim \text{Bernoulli}\left(\frac{\bar{p}^{(1)}_{ij}}{\bar{p}^{(0)}_{ij} + \bar{p}^{(1)}_{ij}}\right)\]
Score both, normalise, flip a weighted coin. Repeat 8,010 times per sweep.
The network is never solved whole — only one link at a time, given all the others.
Every modelling decision lives in the prior object; sarw() only runs it.
True adjacency, estimated link probabilities, the separation of true links from non-links, and each parameter’s posterior against its true value.
AUC 0.976 · 95.3% of 1,560 cells classified correctly
On a network whose answer we already knew, the sampler found it.
| True | Estimate | 95% interval | Covered? | |
|---|---|---|---|---|
| \(\rho\) | 0.600 | 0.528 | [0.509, 0.542] | no |
| \(\sigma^2\) | 0.050 | 0.064 | [0.056, 0.073] | no |
| slope | −1.000 | −1.032 | [−1.053, −1.009] | no |
The sparsity prior thins the network, and pulls \(\rho\) down with it.
Trust the structure. Hedge the intervals.
| Quantity | Paper | Ours | Verdict |
|---|---|---|---|
| \(\rho\) | 0.71322 | 0.71322 | exact |
| log initial GVA | −0.01692 | −0.016922 | exact |
| share high education | 0.00044 | 0.000441 | exact |
| av. indirect, initial GVA | −0.03972 | −0.039723 | exact |
12 of 12 quantities exact to the five decimals printed.
Reproducing the published numbers is the licence to reinterpret them.

Regions place 35.6% of their neighbourhood weight on compatriots.
Chance would give 7.1%.
Nothing in the specification mentions countries — the model saw only growth, initial productivity and two education shares.
| Comparator | AUC | Share of top links |
|---|---|---|
| Same country | 0.753 | 30.2% |
| Queen contiguity | 0.698 | 17.2% |
| 7-nearest neighbours | 0.631 | 23.9% |
The strongest links average 921 km; a random pair averages 1,331 km.
Among the 33 links with probability \(\geq 0.5\): 60.6% share a border (14.2× enrichment) against 75.8% same-country (10.6×).
Nationality organises the whole ranking; geography owns the links the data are certain about.

Teal — the pair also shares a border.
Orange — it does not.
Long orange arcs dominate: Bulgaria to Czechia, Iberia to the Baltic, Greece to Ireland.
Were the estimated network essentially contiguity, this would be a mesh of short teal arcs hugging borders.
| Estimated | Queen | 7-NN | |
|---|---|---|---|
| \(\rho\) | 0.713 | 0.607 | 0.719 |
| High education, total | 0.00153 | 0.00066 | 0.00074 |
| Indirect ÷ direct | 2.11 | 1.20 | 2.20 |
Every sign survives. Every magnitude moves.
The data-chosen map more than doubles the total education effect.
2.11 under the estimated map. 1.20 under contiguity.
Most of the education return leaks across borders — or only about half does. Same data, different map.
Bulgaria → Czechia at probability 1.0 says one thing only: residual co-movement fits better with that link than without it.
It does not mean trade, commuting, or FDI.
With \(T = 19\), genuine transmission and shared exposure to common shocks are indistinguishable.
Report the point estimates. Hedge everything that has a width.
Every spatial result you have read is conditional on a map somebody chose — and it does not have to be.
Full tutorial, code and replication bundle: https://carlos-mendez.org/post/r_estimatew/