From Global Association to Spot-Level Patterns
A global Moran statistic summarizes spatial autocorrelation across an entire tissue section. It can indicate an overall tendency for neighboring spots to have similar values, but it does not identify where similar values occur or which spots differ from their neighbors. Local Moran statistics address that location-specific question. They help distinguish spots that are similar to their neighborhood from spots that contrast with it.
For a chosen gene or other scalar measurement, let \(x_i\) be its value at spot \(i\). The value should be on a scale suitable for comparing spots, such as an appropriately normalized or transformed expression scale. Let \(w_{ij}\) be the spatial weight from spot \(i\) to spot \(j\), with \(w_{ii}=0\). Often weights are nonnegative and are zero for spots not considered neighbors. Row-standardized weights make the weights for each spot with neighbors sum to one.
The sign of \(I_i\) indicates whether the spot and its weighted neighborhood lag have the same sign. But a statistic’s sign alone is not a complete classification: inspect both \(z_i\) and \(L_i\). Positive \(z_i\) means above the overall mean; negative \(z_i\) means below it. The lag has the corresponding interpretation for the weighted neighborhood.
| Spot value \(z_i\) | Neighborhood lag \(L_i\) | Quadrant interpretation |
|---|---|---|
| Positive | Positive | High-high: an above-mean spot among above-mean neighbors |
| Negative | Negative | Low-low: a below-mean spot among below-mean neighbors |
| Positive | Negative | High-low: a high-valued spatial outlier relative to its neighbors |
| Negative | Positive | Low-high: a low-valued spatial outlier relative to its neighbors |
“High” and “low” here mean above and below the mean used to standardize the values, not necessarily biologically high or low expression. These quadrant labels describe a pattern; they do not, by themselves, establish statistical significance.
How the Local Statistic Connects to the Global One
The local statistic is built from the same weighted products that appear in global Moran’s I. This connection explains why local calculations can help locate the contributions to a global pattern, while also showing why one should not treat each local value as an independent global summary.
To relate this to the conventional global statistic, define \(S_0=\sum_i\sum_j w_{ij}\). Since the chosen standardized values satisfy \(\sum_i z_i^2=n\), the global Moran statistic is \(I=(n/S_0)\{\sum_i\sum_j w_{ij}(x_i-\bar{x})(x_j-\bar{x})/\sum_i(x_i-\bar{x})^2\}\). Substituting \(z_i=(x_i-\bar{x})/\sqrt{\sum_i(x_i-\bar{x})^2/n}\) gives \(I=(1/S_0)\sum_i I_i\). In particular, with row-standardized weights and no isolated spots, \(S_0=n\), so the global statistic is the average of the local statistics under these conventions.
This identity is an algebraic decomposition, not a claim that all local statistics are independent or individually significant. A global result can reflect many modest contributions or a small number of strong local patterns. Local inference is needed to assess evidence at particular spots.
Worked Example: Calculating High-High and Low-Low Statistics
Suppose six hypothetical spots A through F have expression values \(0,0,2,2,4,4\), respectively. Use a path graph, so each interior spot is adjacent to the spots immediately before and after it, while each endpoint has one neighbor. Calculate the local Moran statistic at B and E.
The mean is \(\bar{x}=(0+0+2+2+4+4)/6=2\). The sum of squared deviations is \(4+4+0+0+4+4=16\), so the scale in the definition is \(\sqrt{16/6}=1.633\). The standardized values, rounded to three decimals, are \(z_A=z_B=-1.225\), \(z_C=z_D=0\), and \(z_E=z_F=1.225\).
With row-standardized weights, B has neighbors A and C, so \(L_B=(-1.225+0)/2=-0.6125\). Therefore,
Both B and its neighborhood lag are below zero, so B has a low-low pattern. E has neighbors D and F, giving \(L_E=(0+1.225)/2=0.6125\), and
E has a high-high pattern. These positive statistics describe same-sign local associations. No significance conclusion follows from these calculations alone; that requires an appropriate reference distribution or test.
Local Inference and Multiple Testing
A common way to assess a local statistic is a conditional permutation test. Under the local null being tested, hold the focal value \(z_i\) fixed and compare its observed neighborhood lag with lags formed by randomly assigning the other observed values to the eligible neighboring locations. This asks whether the focal value is unusually associated with its neighborhood under the specified random-assignment null. It does not test whether the value at the spot is unusual on its own.
The permutation scheme must match the assumptions. In particular, the values eligible for reassignment should be exchangeable under the null being tested. If spots differ systematically by tissue region or another known grouping, unrestricted reassignment may not represent a plausible null; a suitable restricted scheme or a different analysis may be needed. The graph, expression scale, permutation scheme, and definition of extremeness should be chosen before interpreting results. A two-sided test treats unusually large and unusually small statistics as evidence against the null. With \(B\) random permutations and \(b\) simulated statistics at least as extreme as observed, a common Monte Carlo p-value is \((b+1)/(B+1)\), which avoids reporting a zero p-value.
Testing many spots creates a multiple-testing problem, and testing many genes across many spots creates an even larger family. A false discovery rate procedure such as Benjamini–Hochberg can control the expected proportion of false rejections among rejections under its standard independence or suitable positive-dependence conditions. Spatial tests are dependent, so those conditions should not be assumed automatically. More conservative procedures, such as Benjamini–Yekutieli, are available for control under arbitrary dependence. The family of tests and correction should be reported.
Worked Example: Correcting Local Tests Across Spots
Suppose six hypothetical spots are tested for one gene, producing permutation p-values \(0.001, 0.008, 0.012, 0.041, 0.200,\) and \(0.600\). Apply the Benjamini–Hochberg procedure at false discovery rate level \(q=0.05\), treating these six tests as the family.
Order the p-values from smallest to largest. For rank \(k\) among \(m=6\) tests, compare \(p_{(k)}\) with \(kq/m\). The thresholds are \(0.00833, 0.0167, 0.0250, 0.0333, 0.0417,\) and \(0.0500\). The first three comparisons are \(0.001\leq0.00833\), \(0.008\leq0.0167\), and \(0.012\leq0.0250\). The fourth fails because \(0.041>0.0333\); the fifth and sixth also fail.
The largest passing rank is three, so the procedure rejects the first three local null hypotheses at the stated false discovery rate level. This does not mean that each rejected spot has a 5% probability of being a false finding. Rather, under the procedure’s conditions, the expected proportion of false rejections among all rejections is controlled at the target level.
Boundary-Sensitive Interpretation
A local lag summarizes the neighbors included by the graph. Near a tissue boundary, a spot may have fewer neighbors, or its neighbors may lie in different tissue regions. Row standardization gives a spot with one neighbor a weight of one for that neighbor; it does not make the spot’s neighborhood biologically equivalent to a spot with several neighbors. A boundary can also mix regions with different expression levels, changing the lag and hence the local quadrant.
Worked Example: A Mixed Neighborhood at a Tissue Boundary
Consider a hypothetical focal spot with \(z_i=2\). It has two equally weighted neighbors: one in the same tissue region with \(z=2\), and one across a boundary with \(z=-1\). With row-standardized weights, \(L_i=(2+(-1))/2=0.5\), so \(I_i=(2)(0.5)=1\). The focal spot is in the high-high quadrant because its value and average lag are both positive, but the lag conceals a contrasting neighbor.
If the analysis instead used only the within-region neighbor, the lag would be \(2\), and the local statistic would be \(I_i=(2)(2)=4\). This difference shows that the boundary and graph definition affect the measured pattern. It does not justify deleting an inconvenient neighbor after seeing the result. Instead, report how neighborhoods are defined and assess whether a boundary-aware graph is scientifically justified.
For comparison, if a focal spot with \(z_i=2\) has two neighbors both at \(z=-1\), its lag is \(-1\) and its statistic is \(-2\). This is a high-low spatial-outlier pattern. Whether it is statistically unusual still depends on its test and multiplicity correction.
Diagnostics, Alternatives, and Limitations
Interpret local results alongside diagnostics rather than as a standalone map of discoveries. Check that the graph matches the tissue layout, that spots with no neighbors are identified, and that weights are defined consistently. Inspect the focal values and lags as well as the statistics: a large positive local statistic can arise from a high-high or low-low pairing, and a negative statistic from either type of spatial outlier. Check the permutation p-value resolution, the number of tests, and the correction applied. Maps of quadrants, statistics, and adjusted results answer different questions and should not be conflated.
Local Moran analysis is not the only way to describe spatial structure. Global Moran’s I summarizes overall autocorrelation but does not locate it. A local statistic gives spot-level summaries conditional on a neighborhood graph, while an empirical variogram describes how dissimilarity changes with spatial separation. These approaches are not interchangeable: they target different summaries and depend on different spatial representations. Local Moran statistics also do not model the count-generating process, correct for cell-type composition, or establish a causal mechanism. Expression transformation, measurement noise, uneven spot coverage, and neighborhood scale can all affect the results.
- Mistake: Calling every positive \(I_i\) a high-high cluster. Correction: Determine the signs of both \(z_i\) and \(L_i\); a positive product can also indicate low-low.
- Mistake: Calling a quadrant label a statistically significant cluster. Correction: Use the local test and account for the full family of spot-level or gene-by-spot tests.
- Mistake: Interpreting a significant local pattern as evidence that expression at one spot causes expression in its neighbors. Correction: Local Moran statistics describe spatial association under a chosen graph, not causation.
- Mistake: Treating all spots as having equally informative neighborhoods. Correction: Inspect neighborhood size and boundary placement, and report how they affect the lag.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A spot has \(z_i=-1.4\) and \(L_i=-0.5\). What is its local Moran statistic and quadrant?
- A spot has \(z_i=1.2\) and \(L_i=-0.8\). What pattern does it describe, and what is its local statistic?
- Why does a positive local statistic not, by itself, establish a significant high-high cluster?
- In a conditional permutation test, why is the focal value held fixed, and what assumption must be considered for the reassigned values?
- Why can a spot near a tissue boundary have a different local interpretation under a different neighborhood graph?
Solutions. (1) \(I_i=(-1.4)(-0.5)=0.70\); both signs are negative, so the pattern is low-low. (2) \(I_i=(1.2)(-0.8)=-0.96\); the focal spot is high relative to the mean while its lag is low, so it is high-low. (3) A positive value can represent either high-high or low-low, and statistical significance requires a reference test and appropriate treatment of multiple comparisons. (4) Holding the focal value fixed tests its association with the neighborhood rather than whether the focal value itself is unusual; reassigned values must be exchangeable under the null and permutation scheme. (5) The graph determines which spots contribute to the weighted lag, so including or excluding neighbors across a boundary can change the lag, statistic, and quadrant.