Which districts count as close decides what an estimate borrows.
Computational Approaches to the Non-Observed EconomySpace and systems
Module 6Spatial dynamics
One national number can hide very different maps, and the map changes the policy. On an invented country of 160 hexagonal districts with a river, a smuggling corridor, two market towns and 40 surveys, we name the support, relation, observation process and task of a spatial study, use norms and graphs (and say what an edge means), smooth where the economy is continuous and not across a border, report the distance to the evidence, and test for structure with shuffles. Then we work backwards from traces to hidden activity, list the ways that fails, validate on regions a model never saw, and compress a detailed map into a small graph of regimes.
Key ideas, one per video
- Video 12Moran's I was 0.86 on the Mainland, but a survey method alone produced 0.26, and a shuffled map still showed 7 'significant' local clusters. Picking audits by network exposure found a hider a third of the time, against one in eight at random.
- Video 13The raw inversion was off by 4.4 points and light smoothing by 2.2. A wrong observation operator raised the error to 11.6, while deleting 30% of graph links left it at 2.2. Holding out whole regions doubled the map-neighbour error (2.3 to 4.6).
Book: Chapter 6 of Computational Approaches to the Non-Observed Economy: From Theory to Practice (coming soon). The videos and slides follow the chapter’s topics in our own words, figures and simulations; the towns and countries are invented, and nothing is copied from the book.
Watch
2 videos for this module, each about 8 to 11 minutes. Pick one from the list, and open the transcript to read along: each timestamp plays the video from there. The narration is generated with a voice clone of Teddy, used with his permission.
Video 12 · 8:50
Shadows have neighbours
Three maps of one invented country, each averaging 22% hidden: evenly spread, along a corridor, or around two market towns.
Moran's I was 0.86 on the Mainland, but a survey method alone produced 0.26, and a shuffled map still showed 7 'significant' local clusters. Picking audits by network exposure found a hider a third of the time, against one in eight at random.
TranscriptVideo 12
Same average, three maps. Here are three maps of the same invented country. In every one of them, the hidden share of the economy averages 22 percent. In the first map, hiding is spread evenly. In the second, it follows a smuggling corridor. In the third, it gathers around two market towns. A national estimate can't tell these apart. It's the same number every time. But they call for different policies. Patrol a corridor, inspect two markets, or improve services everywhere. Where hiding happens, and through which links, is part of the answer. This module is about seeing that structure.
The Mainland. Welcome to Module 6: the spatial dynamics of the non-observed economy. I'm Teddy. Our world zooms in on one country of the Archipelago. We call it the Mainland. It has 160 districts on a hexagonal map. A river splits it into two provinces. The West introduced e-invoicing, so it hides less. In the East there's a smuggling corridor from a border crossing to the port, two market towns, and hills full of self-employment. Careful surveys exist in 40 districts, mostly around the capital in the West. Everything else has to be estimated.
Name four things. Spatial analysis starts from a simple observation: nearby things tend to be more related than distant ones. But nearby can mean many things. Two districts can be neighbours on the map. Two countries can be close because their institutions are alike. Two firms can be close because they share an owner or trade every week. So before any model, name four things. The support: where is the process defined? Districts, firms, or transactions. The relation: who counts as close? The observation process: how does hidden activity leave traces? And the task: describe, predict, reconstruct, or simulate. Two warnings come with maps. Change the size of the regions, and the patterns you find can change. And a pattern among regional averages need not hold for the people or firms inside them.
Distance and bandwidth. The first way to represent space is a norm. Put every district in a feature space, and measure how far apart they are. The features can be coordinates, or the economy: cash use, self-employment, income, digital payments. The choice of distance says what similar means. When features are correlated, a distance that accounts for that stops one idea from being counted twice. When they mix numbers and categories, you need a distance built for mixed data. Distances turn into weights through a kernel, and the kernel has a bandwidth. Let's estimate the 120 unsurveyed districts from the 40 surveyed ones, weighting by economic similarity. With a tiny bandwidth, each estimate leans on one or two lookalikes, and the error is about 5.2 points. At the best bandwidth, it's 4.7. With a huge bandwidth, every survey counts equally. The error climbs to 9.2, almost exactly the error of the plain average. Which neighbours should count? Five nearest on the map gave an error of 4.8. Five nearest in the economy, also 4.8. A distance that mixes both did better, at 4.4. A norm also lets relationships change across space. A local regression fits its own coefficients around each district. Useful, but a map of local coefficients is not a map of causes.
A firm network. The second representation is a graph. Nodes are units, and edges are relations: shared borders, similar profiles, trade, ownership, or movement of workers. Graphs come with a toolbox. Who is central, how clustered the network is, and which groups trade mostly among themselves. One graph is often not enough. Geography, transactions, ownership and social ties are different layers. Merging them can invent paths that don't exist, so say what an edge means. Here's a firm network we invented. Three hundred firms in fifteen trading communities. In three of those communities, most firms hide sales. Elsewhere, few do. Fifteen hiders have already been caught. The tax office can audit thirty more. Who should it pick? Picking at random finds a hider in about one audit in eight. Picking the firms located closest to known hiders, about one in five. Picking by network exposure, how close a firm is to known hiders through its trading links, finds a hider in a third of the audits. The communities weren't geographic, so the map missed them. One caution: the edges most likely to be missing are cash deals and informal subcontracting. A missing link is not proof of independence.
Smoothness and borders. A graph also lets you measure smoothness: add up the squared differences between connected districts. Small means neighbours look alike. That sum is a useful regulariser. But smoothness is an assumption, not a law. Borders, reforms and special zones create real jumps. Our river is one. Let's take a cheap, noisy estimate for every district, and smooth it over the map. Right at the river, the true step between the provinces is 6.4 points. Smoothing across the river shrank it to about four. Cutting the edges that cross the river kept a step, though it overshot, at 8.7 points. And near the river, the error fell to 1.6 points, down from 1.8. Smooth where the economy is continuous. Let the model jump where the rules change.
Distance from the evidence. Distance can also be an indicator in its own right. Distance from a tax office, a bank, or a border can stand for enforcement, transaction costs, or how well statistics reach a place. On a globe, straight-line distance is a start. Inside a country, travel time and road access usually mean more. And a nearest-neighbour graph can quietly create very long edges for remote places, so look at it. In networks, distance is the shortest path. A firm can be one ownership step from a known shell company, and far away on the map. One distance deserves a place in every report: how far a district is from the nearest surveyed district, in the economy's terms. For the quarter of districts closest to a survey, our neighbour estimates were off by about 1.7 points. For the farthest quarter, about 10.5. Every one of the farthest was in the East. Distance from the evidence is a warning light. It tells you when a model is extrapolating, which a standard confidence interval often doesn't.
Moran's I and local clusters. Now, how do you test whether a map has structure at all? The classic statistic is Moran's I. It asks whether connected districts deviate from the mean in the same direction. For the Mainland's hidden shares, Moran's I is 0.86. To judge it, shuffle the values across the map and recompute. None of 999 shuffled maps came close. The evenly spread map from the start scores about zero. The corridor map, 0.70. The market-town map, 0.59. Here's a trap. We made a map with no hidden structure at all, but the East's survey method reads three points high. Moran's I jumped to 0.26, and again, no shuffle came close. Spatial structure in the measurements is not the same as spatial structure in the hidden economy. Local statistics break the map into clusters: high districts among high neighbours, low among low, and outliers. The Mainland has 36 high clusters, 55 low ones, and no significant outliers. Before the next number, guess. If we shuffle the map completely, how many districts will still look like significant clusters? Seven. With 160 tests at the five percent level, some false hot spots are guaranteed. Local maps are exploratory, and multiple testing has to be reported. Finally, a dependent map can enter a regression in two ways. Neighbours' hidden shares can affect each district directly, or the errors can be correlated because something spatial is missing. They mean different things, and cross-sectional data often can't tell them apart.
Recap. Let's recap. A national number hides very different maps, and the map changes the policy. Name the support, the relation, the observation process and the task. Norms measure similarity, graphs encode relations, and both need a stated meaning. Smooth where the economy is continuous, not across borders. Report the distance to your evidence. And test structure with shuffles, remembering that measurement methods can create it. In the lab, you'll explore the Mainland's map, change who counts as a neighbour, and hunt for hot spots, real and false. Next video: turning traces on a map back into the hidden activity that made them.
Where cash becomes visible. Here's the Mainland's map of cash withdrawals. The brightest districts are eight towns with banks. Read it as a map of hiding, and those eight towns hold 81 percent of all hidden activity. In our invented world, we know the truth. They hold about five percent. People from the countryside travel to town to withdraw cash. A trace shows where activity becomes visible, not where it happens. This video is about working backwards, and checking the result honestly.
Four steps. Welcome back to Module 6. This is video two: from a map to a model. We'll reconstruct a hidden map from its traces, list the ways that fails, validate spatial predictions properly, and compress a detailed map into a small model of regimes.
The inverse problem. Spatial analysis of the hidden economy is often an inverse problem. We see traces, and we want the activity that produced them. Write the traces as the hidden map passed through an observation operator. In our world, a rural district withdraws 80 percent of its cash in the nearest town, and only 20 percent locally. If we know that operator, we can invert it exactly. But measurement noise gets amplified. The raw inversion was off by 4.4 points on average, and by up to 13 points in the towns. That's what ill-posed means. Many hidden maps fit the traces almost equally well, and small changes in the data cause large changes in the answer. The classic fix is regularisation: among the maps that fit, prefer ones where neighbours are similar. With a light smoothing penalty, the error fell to 2.2 points, and in the towns to 3.4. But smoothing has a price. At the market-town hot spots, the raw inversion was off by 2.5 points. Light smoothing made that 2.7, and heavy smoothing, 5.2. Sharp concentrations get blurred away. Other penalties encode other beliefs: hiding concentrated in a few places, or paths that are smooth with occasional breaks. Either way, the answer depends on the prior, so report it.
Other traces. Reconstruction gets stronger when several traces see different parts of the hidden map. Researchers have linked night-time lights, satellite imagery, and phone records to output, poverty and wealth, especially where official statistics are thin. None of these measures the hidden economy directly. They show how to anchor high-resolution traces with a few careful labels, and why you must test on regions the model never saw. For hiding, each trace needs a reason to respond to hidden activity, not just to activity in general.
Ways it fails. Spatial reconstruction can fail in at least five ways. Let's see some of them in our world. First, an ambiguous trace. Cash can mean hiding, or tourists, or distrust of banks. We added tourist cash at the port. The port's error doubled, from about five points to about ten. Second, a wrong operator. Suppose we believe rural districts withdraw 40 percent of their cash in town, when it's really 80. The error jumped to 11.6, up from 2.2. If we send 30 percent of the districts to the wrong town, the error rises to 4.3. Third, a wrong graph. We deleted 30 percent of the neighbour links used for smoothing. The error barely moved, 2.2 either way. Here, the operator mattered far more than the graph. Fourth, boundary mismatch: the traces and the benchmarks are counted over different regions. Fifth, process change: a reform or a new payment system changes how hiding becomes visible. And sixth, if you like, support failure: applying the model to districts unlike any surveyed one, which we met in the last video. Uncertainty in a reconstructed map has to include the operator, the graph and the prior, not only the noise.
Hold out whole regions. Now, validating spatial predictions. Suppose every district had a survey, and we want to know how well a model would do in a region it never saw. We compare four models: the plain average, a regression on the economic indicators, a random forest that also sees coordinates, and an average of the five nearest districts on the map. The usual check holds out random districts. The spatial check holds out whole blocks of the map, five regions in turn. Before the numbers, guess. Which model will lose the most when we switch to whole blocks? The map neighbours. With random holes, every test district has surveyed neighbours, and the error is 2.3. With whole blocks held out, it doubles, to 4.6. The forest's error grew too, to 2.1, up from 1.8. The regression on indicators lost the least: 1.9, up from 1.7. It relies on the economy, not on location, so it travelled best. Also check the leftovers. Moran's I of the errors was 0.58 for the map neighbours and 0.22 for the regression. A spatial pattern in the errors means something spatial was missed. And ask whether each target region lies inside the range of the training data. If it doesn't, the block check should say so.
Smooth gently. One more knob: smoothing a model's predictions over the graph. The regression's block-checked error was 1.9. Light smoothing brought it to 1.6. Heavy smoothing pushed it up to 3.8, because it erased real differences, including the step at the river. A strong Moran's I says neighbours are similar. It doesn't say they should be forced to be identical.
A small graph of regimes. The last idea of the module is reduction. A detailed spatial model can be expensive to simulate again and again. Can a small graph do the job? We follow the 160 districts for twenty years. That's 3,200 district-years, each a point in a space of hidden share, cash, digital payments, self-employment and location. Halfway through, the East adopts e-invoicing. The reduction has two stages. First, partition the space into a few regimes. Each regime becomes a node. Second, learn how districts move between regimes, as a transition table. Then score two things. Fidelity: does the small model reproduce the national trajectory? And reduction: with eight nodes instead of 160 districts, pairwise interactions shrink by 99.8 percent. A map grid is the obvious partition. But districts never move on the map, so the grid's transition table says nothing ever changes. It matched the national path at 93.7 percent. Economic regimes do better. Eight k-means regimes followed the path at 98.0 percent, and their transition model at 97.1. Why the gap? A transition table only knows the current regime, not the year. It spread the reform's sudden drop over two decades. Other partitions make other trade-offs. Covering the space evenly kept a rare regime where the hidden share averaged 39 percent. K-means merged it into a regime near 36. Adaptive splitting adds nodes where the map is most mixed. Always report fidelity and reduction together. And a transition between regimes describes what similar districts did. It's not a causal path.
Recap. Let's recap. Traces show where activity becomes visible. Working backwards is an inverse problem, and regularisation makes it stable at the cost of blurring. The observation operator can matter more than the graph. Get it wrong, and the map is wrong with confidence. Validate by holding out whole regions, check the errors for leftover structure, and smooth gently. A small graph of regimes can stand in for a detailed map, if you report both fidelity and reduction. In the lab, you'll reconstruct the Mainland from its cash traces, and build your own reduced graph. Next module: building the hidden economy from the bottom up. Agent-based simulation.
8:50Video 12 · 6.1Shadows have neighboursMoran's I was 0.86 on the Mainland, but a survey method alone produced 0.26, and a shuffled map still showed 7 'significant' local clusters. Picking audits by network exposure found a hider a third of the time, against one in eight at random.
8:06Video 13 · 6.2From a map to a modelThe raw inversion was off by 4.4 points and light smoothing by 2.2. A wrong observation operator raised the error to 11.6, while deleting 30% of graph links left it at 2.2. Holding out whole regions doubled the map-neighbour error (2.3 to 4.6).
Interactive lab
The night atlas
Explore an invented country of 160 hexagonal districts with 40 surveys. Choose who counts as a neighbour, estimate the unsurveyed districts, smooth across or within a river, test for spatial structure with shuffles, and hunt for hot spots, real and false.
The map is simulated in your browser (a river, a smuggling corridor, two market towns, hills). Four challenges are checked as you go.
The night atlas: 160 districts, 40 surveys
An invented country on a hexagonal map. A river splits a West that hides less from an East with a smuggling corridor, two market towns and hills. Careful surveys exist in 40 districts (rings), mostly in the West; cash use and self-employment are known everywhere.
Cut the edges across the river and the model can jump there.
Compare it with shuffled maps; local versions find clusters.
Running…
The map
Challenges
Each one is checked on your current settings.
- See Moran's I above 0.8 on the true map, then shuffle the values and bring it near zero.
- Estimate the unsurveyed districts with an error below 2.3 points.
- Smooth with a strength of at least 1 and still keep a step of at least 7 points at the river.
- On the shuffled map, find at least three “significant” local clusters: false hot spots from many tests.
