| Table of Contents | |
|
1. Overview |
2. Objective |
|
3. Data and Simulation Design |
4. Methodology |
|
5. Results and Visualization |
6. Formal Algorithmic Test |
|
7. Results and Conclusion |
8. Reference |
|
9. Author Notes |
10. Dependencies |
This project replicates and illustrates the methodology of Duranton and Overman (2005), “Testing for Localization Using Micro-Geographic Data” (Review of Economic Studies, 72(4): 1077–1106).
Their paper introduces a distance-based test for localization, which determines whether firms in a specific industry are more spatially clustered or dispersed than would be expected under random placement.
In this replication, we simulate both unbiased (random) and biased (clustered) firm location data to test whether the Duranton–Overman methodology can correctly detect agglomeration when it is present.
By comparing pairwise distance distributions of randomly distributed firms against intentionally clustered industries, the project demonstrates how the method identifies significant deviations from spatial randomness.
To do so, the replication builds a Monte Carlo counterfactual benchmark representing the expected distribution of inter-firm distances under complete spatial randomness. Observed industries are then compared against this benchmark to test whether their spatial patterns reflect genuine clustering rather than random variation.
The replication demonstrates:
- Simulating unbiased (uniformly distributed) firm locations as a control sample.
- Simulating biased (spatially clustered) firm locations to represent agglomeration.
- Constructing a Monte Carlo counterfactual for random spatial distributions.
- Bootstrapping density estimates to generate 95% confidence bands for expected randomness.
- Testing whether Duranton & Overman’s localization method successfully detects clustering in biased data while not flagging unbiased data.
| Parameter | Description |
|---|---|
| Population | 1,000 firms uniformly distributed across a 2D grid ([0, 1] × [0, 1]) |
| Industry A | 100 firms drawn from the uniform grid (expected to behave randomly) |
| Industry B | 100 firms drawn from |
| Monte Carlo Simulations | 10,000 random draws of 100 firms each to form the counterfactual |
All data are generated synthetically; no external datasets are required.
The method replicates Duranton and Overman’s approach by comparing pairwise inter-firm distance distributions:
- Randomly draw sets of firm locations to simulate spatial randomness.
- Compute the density of inter-firm distances for each draw.
- Aggregate simulations to construct an expected “random” distribution.
- Calculate 95% confidence intervals (bands) for the random case.
- Compare observed industry distance densities to these bands.
In this replication, the Monte Carlo simulation serves as the random baseline for comparison against the observed industries.
Each iteration randomly selects 100 firms out of 1,000 possible locations within a uniform 2D grid.
This process is repeated 10,000 times, and in each simulation all pairwise distances between the sampled firms are computed.
This approach models the inherent randomness of spatial spacing and showss what inter-firm distances would look like if there were no clustering forces at all.
By aggregating these simulated distance distributions, we obtain a smooth estimate of the expected distance density under spatial randomness.
The resulting distribution forms the Monte Carlo confidence band, which represents the natural variability of random spatial configurations.
Industries whose observed distance distributions fall outside this band are interpreted as exhibiting non-random spatial behavior.
- Higher density at short distances → spatial clustering or agglomeration, and
- Lower density at short distances → spatial dispersion.
The first visualization compares Industry A (uniformly distributed) with the Monte Carlo baseline.
The gray ribbon shows the 95% confidence interval, the blue line represents the random benchmark, and the red line represents the observed industry.
Interpretation:
Industry A’s curve remains within the confidence band, suggesting no spatial localization beyond inherent randomness.
The second visualization introduces Industry B, drawn from a clustered normal distribution, and compares both industries to the Monte Carlo benchmark.
Interpretation:
The curve for Industry B exceeded the upper confidence band at short distances, revealing higher-than-expected density for nearby firms.
The replication demonstrates that Duranton and Overman’s (2005) distance-based localization method performs as intended when applied to simulated data.
Using the Monte Carlo counterfactual, the test effectively distinguishes between industries that are spatially random and those that are intentionally clustered.
However, one limitation of this approach is at the extreme tails of the distance distribution.
Because the confidence bands are extremely narrow at these edges, the algorithmic test can misclassify random noise as statistical deviation, even when visual inspection clearly suggests that the pattern remains random.
This work is a pedagogical replication, illustrating how spatial econometric methods can be validated through simulation, not a true replication with the original author's data.
Duranton, Gilles & Overman, Henry. (2005). Testing for Localization Using Micro-Geographic Data. Review of Economic Studies. 72. 1077-1106. 10.1111/0034-6527.00362.
This replication was conducted in R (≥ 4.3) and uses the following packages:
dplyrspatstattibbleggplot2
All other operations use base R functions. No external libraries or data sources are required.

