Why Spatial Effects Are Matrix-Valued
In a spatial-lag model, a change in one unit’s covariate can alter its own expected outcome and, through spatial feedback, the expected outcomes of connected units. Those outcomes can feed back in turn. The coefficient on the covariate therefore does not generally describe the full change in expected outcomes. The impact matrix records the marginal response of every outcome to a change in every unit’s covariate. Its diagonal captures own-unit responses, while its off-diagonal entries capture responses across units.
This tutorial develops average direct, indirect, and total effects from that matrix. The calculations describe derivatives of a conditional mean, holding the spatial weights matrix fixed. They are not, by themselves, evidence that an observed covariate change is causal.
From the Model to the Impact Matrix
Let \(y\) be an \(n\)-vector of outcomes, let \(W\) be a fixed \(n\times n\) spatial weights matrix, and let \(x_k\) be the \(n\)-vector of values of covariate \(k\). A spatial-lag model with a linear conditional mean can be written as
Here \(\rho\) is the spatial-lag coefficient, \(\beta_k\) is the coefficient on covariate \(k\), and \(u\) is an error vector. For the conditional-mean interpretation below, assume \(E[u\mid X,W]=0\), with \(X\) denoting all covariates, and assume \(I-\rho W\) is invertible. The stability material gives conditions under which this inverse exists and can be represented by a convergent spatial-multiplier series.
Solving for the conditional mean gives \(E[y\mid X,W]=(I-\rho W)^{-1}\sum_k\beta_k x_k\). Differentiating with respect to the vector \(x_k\) gives the impact matrix for covariate \(k\):
A spatial Durbin conditional mean additionally includes a spatially weighted covariate, \(\theta_k W x_k\). Its impact matrix is
This expression covers the spatial-lag model when \(\theta_k=0\). The key point for interpreting either model is that the effect is the whole matrix \(S_k\), not merely \(\beta_k\). Write its entry in row \(i\), column \(j\) as \(S_{ij,k}\). Under this convention, \(S_{ij,k}=\partial E[y_i\mid X,W]/\partial x_{jk}\): it is the change in expected outcome for unit \(i\) from a one-unit change in covariate \(k\) at source unit \(j\), holding the other covariate values fixed.
The average direct effect summarizes the own-unit response, including any feedback paths that leave a unit and eventually return to it. The average indirect effect summarizes responses transmitted between distinct units. The average total effect adds the two. These are averages across units; they do not assert that every unit has the same response.
How Rows, Columns, and Averages Fit Together
A column of \(S_k\) holds the responses across outcome units to a change in covariate \(k\) at one fixed source unit. Thus its sum is the total change across outcomes generated by that source-unit change. A row holds the responses of one fixed outcome unit to covariate changes across source units. Thus its sum is the change in that outcome under a one-unit change at every source. Summing either all columns or all rows gives the same grand total, because both sum every entry of the matrix once.
In particular, the average total effect can be written as \(n^{-1}\sum_j\sum_i S_{ij,k}\) or \(n^{-1}\sum_i\sum_j S_{ij,k}\). The former averages source-specific column sums; the latter averages outcome-specific row sums. The average direct effect keeps only entries with \(i=j\), and subtracting it from the total removes those own-unit entries from the grand average.
Worked Example: A Two-Unit Spatial-Lag Model
Suppose two units are each connected only to the other, so \(W=\begin{pmatrix}0&1\\1&0\end{pmatrix}\). Consider a spatial-lag model for a covariate measured in dollars, with \(\rho=0.2\) and \(\beta_k=2\) outcome units per dollar. The conditional-mean assumption and invertibility are imposed; here \(W^2=I\), so \(I-\rho W\) is invertible because \(1-\rho^2=0.96\ne0\).
Since \(W^2=I\), \((I-\rho W)^{-1}=(I+\rho W)/(1-\rho^2)\). Therefore
The direct effect is the average diagonal: \((2.0833+2.0833)/2=2.0833\) outcome units per dollar. The indirect effect is the average off-diagonal row sum: \((0.4167+0.4167)/2=0.4167\) outcome units per dollar. Each row sums to \(2.0833+0.4167=2.5000\), so the average total effect is \(2.5000\). Equivalently, the impact of a dollar increase at either source is \(2.0833\) on its own expected outcome and \(0.4167\) on the other unit’s expected outcome.
A Short Derivation of Feedback and Spillovers
Under the usual stability condition that the spatial-multiplier series converges, the spatial-lag impact matrix can be expanded as
The identity term describes the immediate own-unit response \(\beta_k\). The \(W\) term transmits a response along one link; \(W^2\) represents two-link paths; higher powers represent longer paths. A path can end at its starting unit as well as at a different unit. Consequently, diagonal entries include return feedback through the network, while off-diagonal entries collect paths between distinct units. This is why “direct” means the diagonal of the full multiplier, not simply the original regression coefficient.
For the Durbin impact matrix, multiplication gives
The spatially lagged covariate changes the initial transmission as well as the feedback paths. The same diagonal/off-diagonal definitions still apply, but the impacts depend on both \(\beta_k\) and \(\theta_k\), as well as on \(\rho\) and \(W\).
Worked Example: Three Units in a Directed Cycle
Take three units connected in a directed cycle with \(W=\begin{pmatrix}0&1&0\\0&0&1\\1&0&0\end{pmatrix}\). Each row sums to one, \(W^3=I\), and \(W\) has zero diagonal. For a spatial-lag model with \(\rho=0.3\) and \(\beta_k=1.5\) outcome units per covariate unit, \(I-\rho W\) is invertible; the cycle structure gives denominator \(1-\rho^3=0.973\ne0\).
Using \(W^3=I\), the inverse is \((I+0.3W+0.09W^2)/0.973\). Thus the impact matrix is
Every diagonal entry is \(1.5/0.973=1.5416\), so the average direct effect is \(1.5416\) outcome units per covariate unit. The two off-diagonal entries in each row sum to \(0.39\); after scaling, their sum is \(1.5(0.39)/0.973=0.585/0.973=0.6012\). Therefore the average indirect effect is \(0.6012\). Each row sums to \(1.5(1+0.3+0.09)/0.973=2.085/0.973=2.1429\), giving the average total effect. The same result follows from the constant row sum: \(1.5/(1-0.3)=2.1429\). Subtracting the unrounded direct effect from the total gives the same indirect effect, up to rounding.
Worked Example: A Durbin Model with Direct and Indirect Effects
Worked Example: A Durbin Model with Direct and Indirect Effects
Use the two-unit swap matrix \(W=\begin{pmatrix}0&1\\1&0\end{pmatrix}\), and suppose \(\rho=1/3\), \(\beta_k=56/45\), and \(\theta_k=59/90\). These coefficients are in outcome units per covariate unit. The conditional mean includes both \(x_k\) and \(Wx_k\), and \(I-\rho W\) is invertible because \(1-\rho^2=8/9\ne0\).
Since \(W^2=I\), the impact matrix is
The diagonal coefficient is \((56/45+(1/3)(59/90))/(8/9)=(56/45+59/270)(9/8)=(395/270)(9/8)=79/48=1.6458\). The off-diagonal coefficient is \(((59/90)+(1/3)(56/45))/(8/9)=(59/90+56/135)(9/8)=(289/270)(9/8)=289/240=1.2042\). Thus \(S_k\) has diagonal entries \(1.6458\) and off-diagonal entries \(1.2042\).
The average direct effect is \(79/48=1.6458\) outcome units per covariate unit. The average indirect effect is \(289/240=1.2042\) outcome units per covariate unit. Each row sums to \(79/48+289/240=(395+289)/240=684/240=2.850\), so the average total effect is \(2.850\). The same total follows because the rows of \(W\) sum to one: a common one-unit increase in the covariate changes the conditional mean by \((\beta_k+\theta_k)/(1-\rho)=(19/10)/(2/3)=2.850\) per unit. The calculations distinguish the own-unit response from the spillover while preserving their sum.
Why These Summaries Matter
Reporting only a model coefficient can omit multiplier feedback and cross-unit responses. The direct, indirect, and total summaries answer distinct questions: how much an average unit’s own outcome responds to a change in its own covariate; how much responses across other units contribute on average; and what the combined average response is. Units should be stated in context, and the covariate’s scale matters: if it is measured in thousands of dollars rather than dollars, the numerical impacts are per thousand dollars.
The equalities among the summaries are useful checks. Direct plus indirect must equal total when all are computed from the same matrix and averaging convention. Also, average row sums and average column sums must agree, since both sum every matrix entry once. With row-standardized \(W\), a common covariate change has a convenient total-effect formula, but that simplification should not be substituted for matrix calculations when the weights have a different normalization or the changes vary by unit.
Common Mistakes
- Calling the coefficient the direct effect. In a spatial-lag model, the diagonal of \(\beta_k(I-\rho W)^{-1}\) includes feedback paths. Compute the diagonal of the full impact matrix before averaging.
- Reversing row and column interpretations. With \(S_{ij,k}\) defined as the response of outcome \(i\) to source \(j\), a column sum fixes the source and totals responses across outcomes. A row sum fixes the outcome and totals responses across sources.
- Counting diagonal entries as spillovers. The indirect effect uses off-diagonal responses only, or equivalently total minus direct.
- Mixing rounded and unrounded calculations. Compute from unrounded entries, then round the reported results consistently. Small discrepancies can arise if displayed rounded direct and total effects are subtracted.
- Interpreting a derivative as a causal effect automatically. These are marginal effects in the specified conditional-mean model. A causal interpretation requires suitable identification and assumptions beyond the impact-matrix algebra.
Check Your Understanding
Use the impact-matrix definitions and source-unit convention to answer these questions.
- In a three-unit model, what does column \(j\) of \(S_k\) describe? What does its sum represent?
- Why can the average direct effect differ from \(\beta_k\) in a spatial-lag model?
- If the average total effect is \(2.4\) outcome units per covariate unit and the average direct effect is \(1.7\), what is the average indirect effect?
- Why do the average row sums and average column sums of an impact matrix agree?
- In a Durbin model, which parameters enter the impact matrix for covariate \(k\), in addition to \(W\)?