Status, Wealth, and Neighborhood Sorting

What happens when everyone wants high-status neighbors, but wealth limits where people can move? This model populates a 36 × 36 toroidal grid. Adjust its density, group composition, and preference for living near one’s own color to explore how economic inequality and homophily interact.

Neighborhood map

Ready to run

Round 0 / 2,000
Map cells by

Opposite edges touch. Hover or tap a cell for its frozen, start-of-round values.

What is happening?

Statistics describe the population and its current spatial arrangement.

Neighbor status correlation Local status sorting The Pearson correlation between the status values of agents who occupy adjacent Moore-neighbor cells. Values near 1 indicate local similarity, 0 indicates little association, and negative values indicate local dissimilarity. \(r_{S,N}=\operatorname{corr}(S_a,S_b\mid b\in N(a))\) — Initial —
Neighbor wealth correlation Local wealth sorting The Pearson correlation between the wealth values of agents who occupy adjacent Moore-neighbor cells. Values near 1 indicate local similarity, 0 indicates little association, and negative values indicate local dissimilarity. \(r_{W,N}=\operatorname{corr}(W_a,W_b\mid b\in N(a))\) — Initial —
Excess same-color neighbors 0.0 pp Initial —
Population status–wealth correlation Realized Pearson correlation The correlation between status and wealth across all generated agents. Unlike C, it includes differences between color-group means and finite-sample randomness. \(r_{SW}=\frac{\operatorname{cov}(S,W)}{s_Ss_W}\) — Fixed during run

Segregation over time

Tract indices use 3×3 blocks; isolation uses exact locations

Dissimilarity

Dissimilarity index Measures how unevenly a focal group and everyone else are distributed across the 3×3 tracts. Zero is even distribution; one is complete separation. \(D=\frac12\sum_i\left|\frac{x_i}{X}-\frac{y_i}{Y}\right|\)
—Initial —

Distance-decay isolation

Distance-decay isolation Measures the same-group share of the spatial environment around the average focal-group agent. Nearby agents receive exponentially greater weight than distant agents. \(\mathrm{DP}_{xx}=\frac1X\sum_{a\in x}\frac{\sum_b e^{-d_{ab}}\mathbf1(b\in x)}{\sum_b e^{-d_{ab}}}\)
—Initial —

Delta

Delta index Compares a focal group’s distribution across 3×3 tracts with the distribution of land area. Higher values indicate that the group occupies a more concentrated share of space. \(\mathrm{DEL}=\frac12\sum_i\left|\frac{x_i}{X}-\frac{a_i}{A}\right|\)
—Initial —

For color, each group is compared with all other colors and results are population-weighted. For status and wealth, agents are split into fixed lower and upper halves. Dissimilarity and delta use 3×3 tracts; distance-decay isolation uses exact agent-to-agent toroidal distances, scaled so three cell widths equal one distance unit.

How the model works

Space and population

The model is a cellular automaton on a 36 × 36 lattice. Its opposite edges touch, making the grid a torus: a cell on the left edge is adjacent to the corresponding cells on the right edge, and the top similarly wraps to the bottom. Each cell has the eight surrounding cells as its Moore neighborhood.

The grid contains 1,296 cells. If the selected vacancy rate is \(v\) percent, the model creates \(N=\operatorname{round}[1296(1-v/100)]\) agents and leaves the remaining cells vacant. The default vacancy rate of 38.3% produces 800 agents and 496 vacancies.

Each color has an adjustable population ratio. These are relative weights rather than percentages: ratios of 2, 1, and 1 allocate approximately 50%, 25%, and 25% of agents to the three colors. The implied percentage and integer agent count appear beneath each color name. The model converts the ratios to integer counts as closely as possible while ensuring that every selected color has at least one agent. Color is categorical; colors have no inherent ordering or distance from one another.

Wealth and status

Every agent has continuous wealth and status attributes. Wealth determines which vacant cells an agent can afford. Status represents how desirable that agent is as a neighbor: all else equal, every agent prefers neighborhoods containing agents with higher status.

For agent a in color group g, the attributes are generated as

\[ W_a=\mu^W_g+\varepsilon^W_a, \qquad S_a=\mu^S_g+C\varepsilon^W_a+\sqrt{1-C^2}\,\varepsilon^S_a, \]

where \(\varepsilon^W_a\) and \(\varepsilon^S_a\) are independent draws from \(N(0,1)\). The user-selected \(\mu^W_g\) and \(\mu^S_g\) are the expected wealth and status means for group g; both attributes have a within-group standard deviation of 1.

The parameter \(C\in[0,1]\) is the within-color status–wealth correlation. When \(C=0\), status and wealth are independent within each color. When \(C=1\), an agent’s wealth deviation from its group mean completely determines its status deviation. The displayed population correlation is the realized Pearson correlation across all generated agents, so it can differ from \(C\) because of sampling variation and differences between color-group means.

Neighborhood desirability and color preference

Let \(N(i)\) be the occupied Moore neighbors of cell i, and let \(n_i\) be their number. The status desirability of the cell is

\[ A_i= \begin{cases} \displaystyle\frac{1}{n_i}\sum_{j\in N(i)}S_j,&n_i>0,\\[6pt] 0,&n_i=0. \end{cases} \]

This is a mean rather than a sum. For example, if a cell has one neighbor with status 0.7, adding a second neighbor with status 0.1 lowers its status desirability from 0.7 to 0.4.

For an agent of color g, let \(q_{ig}\) be the proportion of cell i’s occupied neighbors that share color g, and let \(p_g\) be that color’s share of the full population. Color fit is measured relative to random-mixing prevalence, \(q_{ig}-p_g\). If a cell has no occupied neighbors, \(q_{ig}\) is defined as \(p_g\), making its color fit zero.

The agent-specific residential utility of cell i is

\[ U_{ig}=A_i+\beta(q_{ig}-p_g). \]

The color-preference parameter \(\beta\) is expressed in status units. At \(\beta=0\), agents have no color preference and the extension reduces to the original status-based decision rule. Larger values mean agents are willing to give up more neighborhood status for greater overrepresentation of their own color. With only one color, \(q_{ig}=p_g=1\), so the color term is always zero regardless of \(\beta\).

Housing prices

Every cell receives a fixed exogenous price \(R_i\sim N(0,1)\). At the beginning of a round, the cell’s raw price combines this fixed value with the mean wealth of its occupied neighbors:

\[ H_i^{\mathrm{raw}}=E\bar W_{N(i)}+(1-E)R_i, \qquad \bar W_{N(i)}= \begin{cases} \displaystyle\frac{1}{n_i}\sum_{j\in N(i)}W_j,&n_i>0,\\[6pt] 0,&n_i=0. \end{cases} \]

Price endogeneity \(E\in[0,1]\) controls the mixture. At \(E=0\), raw prices are entirely exogenous. At \(E=1\), they are entirely determined by neighboring wealth. Intermediate values blend the two.

The model then performs one simultaneous diffusion pass to prevent abrupt price changes between adjacent cells:

\[ H_i=0.75H_i^{\mathrm{raw}}+\frac{1}{32}\sum_{k\in M(i)}H_k^{\mathrm{raw}}, \]

where \(M(i)\) contains all eight Moore-neighbor cells, occupied or not. Thus, a cell retains 75% of its raw value and receives 1/32 from each neighbor, for 25% in total. All cells read from the same raw-price field, so iteration order cannot affect diffusion.

Movement and timing

At the start of every round, the model calculates and freezes all cell prices, status desirabilities, and color-fit values. It then gives every agent one opportunity to act, using a newly randomized agent order.

  1. The acting agent observes every cell that is vacant at that moment.
  2. A vacancy is affordable when its frozen price satisfies \(H_i\le W_a\).
  3. Among affordable vacancies, the agent identifies the greatest residential utility \(U_{ig}\).
  4. The agent moves only if that utility is strictly greater than the frozen utility of its current residence. Otherwise, it stays.
  5. If several destinations tie for the highest utility, one is selected randomly.

An agent may remain in its current residence even when its price has risen above the agent’s wealth. If no vacancy is affordable, the agent is forced to stay. When an agent moves, its destination becomes occupied and its former cell becomes available to agents acting later in the same round. However, both cells retain their start-of-round prices and desirability values until every agent has acted.

After the round, neighborhood values are recalculated from the new arrangement. The simulation converges when a full round produces no moves; otherwise it stops at the selected round limit, which defaults to 2,000. Initialization, agent order, and tie-breaking all use the displayed random seed, so resetting with unchanged settings exactly reproduces a run.

Reported statistics

“Neighbor status correlation” and “neighbor wealth correlation” are Pearson correlations across occupied Moore-neighbor pairs. Each adjacency is counted in both directions, and agents with no occupied neighbors do not contribute a pair. Values closer to 1 indicate that similar agents tend to be immediate neighbors, values near 0 indicate little local association, and negative values indicate that dissimilar agents tend to be neighbors.

“Excess same-color neighbors” is the agent-weighted mean of \(q_{ig}-p_g\), expressed in percentage points. A value of zero means same-color exposure matches population prevalence on average; positive values indicate excess same-color exposure. “Population status–wealth correlation” is the realized Pearson correlation between those attributes across all agents; it does not change as agents move.

Segregation indices

The 36 × 36 grid is divided into 144 fixed tracts, each containing 3 × 3 cells. For color, every color is treated in turn as the focal group and compared with all other colors; the group-specific results are then averaged using population shares. For status and wealth, agents are permanently divided into lower and upper halves according to their initial attribute ranks, and the two group-specific results are averaged. Color segregation is undefined when only one color exists.

For a focal group, let \(x_i\) and \(y_i\) be its population and the complementary population in tract i, and let \(X\) and \(Y\) be their grid-wide totals. The dissimilarity index measures how unevenly the two groups are distributed:

\[ D=\frac{1}{2}\sum_i\left|\frac{x_i}{X}-\frac{y_i}{Y}\right|. \]

Distance-decay isolation measures the focal-group share of the spatial environment experienced by an average focal-group agent. Because every agent’s exact cell is known, it is calculated directly from agent-to-agent distances rather than approximating everyone in a tract as living at its centroid:

\[ \mathrm{DP}_{xx}=\frac{1}{X}\sum_{a\in x} \left( \frac{\sum_b e^{-d_{ab}}\mathbf{1}(b\in x)} {\sum_b e^{-d_{ab}}} \right). \]

Here, \(d_{ab}\) is the exact wrapped Euclidean distance between the centers of the cells occupied by agents a and b. Three cell widths equal one distance unit. The focal agent is included with its exact self-distance \(d_{aa}=0\), rather than an approximated within-tract distance. Because this is an isolation rather than a prevalence-adjusted measure, its random-mixing baseline depends on the focal group’s population share.

Finally, delta compares the focal group’s distribution with the distribution of land area:

\[ \mathrm{DEL}=\frac{1}{2}\sum_i\left|\frac{x_i}{X}-\frac{a_i}{A}\right|. \]

All tracts have equal area, so \(a_i/A=1/144\). Higher dissimilarity indicates greater unevenness, higher distance-decay isolation indicates more same-group spatial contact, and higher delta indicates that the group occupies a smaller and more concentrated share of the available tract area.