Tutorials › Econometrics (Graduate) › Direct, Indirect, and Total Spatial Effects

Spatial and Network Econometrics · Tutorial 937 of 952

Direct, Indirect, and Total Spatial Effects

Learn to construct a spatial impact matrix and summarize its diagonal and off-diagonal effects without confusing own-unit feedback with spillovers.

Advanced 10 min read

What You'll Learn

  • Derive the impact matrix for spatial-lag and Durbin conditional-mean models
  • Define average direct, indirect, and total effects from matrix entries
  • Interpret impact-matrix rows and columns using the source-unit convention
  • Calculate effects and check their arithmetic in worked examples
  • Explain why a regression coefficient alone may not equal a spatial effect

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

$$ y=\rho Wy+\sum_{k=1}^{K}\beta_k x_k+u. $$

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\):

$$ S_k = \frac{\partial E[y\mid X,W]}{\partial x_k'} = \beta_k(I-\rho W)^{-1}. $$

A spatial Durbin conditional mean additionally includes a spatially weighted covariate, \(\theta_k W x_k\). Its impact matrix is

$$ S_k = (I-\rho W)^{-1}(\beta_k I+\theta_k W). $$

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.

Definition: For covariate \(k\), the average direct effect is the average diagonal entry, \(n^{-1}\operatorname{tr}(S_k)\). The average total effect is the average of all row sums, equivalently all column sums, \(n^{-1}\mathbf{1}'S_k\mathbf{1}\). The average indirect effect is the average total effect minus the average direct effect; it is also the average sum of off-diagonal entries in each row.

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

$$ S_k = \frac{2}{0.96} \begin{pmatrix} 1&0.2\\ 0.2&1 \end{pmatrix} = \begin{pmatrix} 2.0833&0.4167\\ 0.4167&2.0833 \end{pmatrix}. $$

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

$$ S_k = \beta_k(I-\rho W)^{-1} = \beta_k(I+\rho W+\rho^2W^2+\rho^3W^3+\cdots). $$

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

$$ S_k = \beta_k I+(\rho\beta_k+\theta_k)W +(\rho^2\beta_k+\rho\theta_k)W^2 +(\rho^3\beta_k+\rho^2\theta_k)W^3+\cdots. $$

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

$$ S_k = \frac{1.5}{0.973}(I+0.3W+0.09W^2) = \frac{1.5}{0.973} \begin{pmatrix} 1&0.3&0.09\\ 0.09&1&0.3\\ 0.3&0.09&1 \end{pmatrix}. $$

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

$$ S_k = \frac{(I+\rho W)(\beta_k I+\theta_k W)}{1-\rho^2} = \frac{(\beta_k+\rho\theta_k)I+(\theta_k+\rho\beta_k)W}{1-\rho^2}. $$

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.
Key takeaway: Construct the full impact matrix first. Its average diagonal is the direct effect; the average sum of off-diagonal entries is the indirect effect; and their sum is the average total effect.

Check Your Understanding

Use the impact-matrix definitions and source-unit convention to answer these questions.

  1. In a three-unit model, what does column \(j\) of \(S_k\) describe? What does its sum represent?
  2. Why can the average direct effect differ from \(\beta_k\) in a spatial-lag model?
  3. 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?
  4. Why do the average row sums and average column sums of an impact matrix agree?
  5. In a Durbin model, which parameters enter the impact matrix for covariate \(k\), in addition to \(W\)?
Clinical Biostats