Why Panel Error Dependence Has More Than One Direction
Panel data record multiple observations on each unit, such as firms over years or patients over visits. An error for unit \(i\) at time \(t\), written \(u_{it}\), can be related to errors for the same unit at other times, to errors for other units at the same time, or to both. These are distinct features of the covariance structure. Recognizing which pattern is plausible matters because a panel is not simply a collection of unrelated observations.
This tutorial classifies dependence by asking which pairs of errors can covary and how that covariance behaves as the panel grows or as units become more distant. A covariance pattern is a description, not by itself an explanation of its cause: common observed conditions, unobserved shared shocks, and other forms of dependence may produce similar patterns.
The conditioning statement is important. A claim about covariance conditional on \(X\) requires assumptions about the joint distribution conditional on \(X\); unconditional uncorrelatedness alone does not establish conditional uncorrelatedness. In the examples below, covariance claims are stated for the conditional error distribution given the regressors.
Reading a Panel Covariance Pattern
In a balanced panel, the same \(N\) units are observed in each of the \(T\) periods. One can arrange the errors as an \(N\)-by-\(T\) array and consider every pair of positions in that array. In an unbalanced panel, some positions are absent. The underlying covariance concept remains the same, but only pairs for which both errors are observed can be directly described from the observed panel.
The basic classification is indexed by whether the unit index and time index match:
| Error pair | Covariance pattern being described | Classification |
|---|---|---|
| \(u_{it},u_{is}\), where \(t\ne s\) | Errors for one unit at different times | Within-unit serial dependence |
| \(u_{it},u_{jt}\), where \(i\ne j\) | Errors for different units at the same time | Contemporaneous cross-sectional dependence |
| \(u_{it},u_{js}\), where \(i\ne j\) and \(t\ne s\) | Errors for different units and different times | Cross-unit, cross-time dependence |
A description such as “errors are correlated within units” is not enough to establish that errors from different units are independent. Likewise, a shared shock at a given time may create contemporaneous cross-unit covariance without creating serial correlation if shocks at different times are uncorrelated. The two dimensions should be assessed separately.
Worked Example: Serial Dependence Without Cross-Unit Dependence
Suppose, hypothetically, that each unit’s error follows the stationary process \(u_{it}=0.6u_{i,t-1}+\varepsilon_{it}\). Conditional on \(X\), let the innovations have mean zero, variance \(1\), and zero covariance across dates and across units. Assume the stationary initial distribution and innovations are also conditionally independent across units. Find the variance and lag-one covariance, and classify the dependence.
For a stationary AR(1) error with coefficient \(0.6\), the variance \(\gamma_0\) satisfies \(\gamma_0=0.6^2\gamma_0+1\). Thus,
The lag-one covariance is the autoregressive coefficient times the stationary variance:
The process creates within-unit serial dependence. By the stated conditional independence across units, \(\operatorname{Cov}(u_{it},u_{js}\mid X)=0\) for \(i\ne j\), whether or not \(t=s\). This example has serial dependence but no cross-unit dependence under its assumptions.
Weak Cross-Unit Dependence and Common Shocks
Cross-sectional dependence describes nonzero conditional covariance across units. Its strength and reach matter as well. A useful distinction is between weak dependence, where a unit is substantially related to only a limited set of other units or covariance declines sufficiently with distance, and a pervasive common shock, which links many units at once. “Weak” here describes the dependence pattern as the number of units grows; it does not mean that every individual covariance must be tiny.
For example, suppose units have locations or an ordering, and conditional covariance declines geometrically with the distance between units. For a fixed unit, the sum of absolute covariances with all other units can then remain bounded as more units are added. By contrast, if a common factor contributes a similar nonzero covariance to every pair, the sum for a unit grows with the number of units. That broad pattern is a hallmark of a pervasive component. The covariance pattern motivates this classification but does not, by itself, prove a particular causal mechanism.
The formula follows by expanding the conditional covariance. Because the conditional means are zero, the covariance is the conditional expectation of the product. The conditional zero cross-covariances remove the factor–idiosyncratic and idiosyncratic cross-products, leaving only the factor contribution:
The middle equality uses the conditional zero means and zero conditional covariances between the factor and each idiosyncratic error. The final equality uses zero conditional covariance between the two idiosyncratic errors. If any of those conditional conditions fail, the displayed simplified expression need not hold.
Worked Example: A Shared Shock Creates Cross-Sectional Dependence
Consider a hypothetical balanced panel with \(u_{it}=\lambda_i f_t+\varepsilon_{it}\). Conditional on \(X\), let \(E(f_t\mid X)=0\), \(\operatorname{Var}(f_t\mid X)=4\), and let the idiosyncratic errors have conditional mean zero, variance \(1\), and zero conditional covariance across units. Also assume zero conditional covariance between \(f_t\) and every \(\varepsilon_{it}\). Set \(\lambda_1=1\) and \(\lambda_2=0.5\). Calculate the two error variances and their covariance at the same time.
For unit 1, the variance is \(1^2(4)+1=5\). For unit 2, it is \(0.5^2(4)+1=2\). The conditional covariance across the two units is
The corresponding conditional correlation is \(2/\sqrt{5\cdot2}=2/\sqrt{10}\approx0.6325\). Thus the common shock produces positive contemporaneous cross-sectional dependence, with a larger loading for unit 1. If, in addition, the shocks and idiosyncratic errors are conditionally uncorrelated across dates, this construction need not produce serial dependence. The cross-sectional pattern alone does not imply a within-unit time pattern.
Worked Example: A Local Covariance Pattern Can Be Weak
Suppose, hypothetically, that \(N\) units have a meaningful ordering and that their same-period conditional covariance is \(0.5^{|i-j|}\), with conditional variance \(1\) for every unit. For four units, list the covariance of unit 1 with units 2, 3, and 4, then show why this pattern has bounded total covariance around a unit as \(N\) grows.
The covariances for unit 1 are \(0.5^1=0.5\), \(0.5^2=0.25\), and \(0.5^3=0.125\). The corresponding sum is \(0.5+0.25+0.125=0.875\). For an interior unit in a panel with many units, there can be at most two units at each positive distance \(h\). Therefore its total absolute covariance with other units is bounded above by the infinite geometric sum
This bound does not grow with \(N\). The pattern has cross-sectional dependence, because nearby units have nonzero covariance, but its reach fades with distance and the aggregate covariance around a unit remains bounded. That is a standard weak, local dependence pattern. A common factor with the same nonzero covariance for every pair would instead give each unit roughly \(N-1\) covariance contributions that do not fade with distance.
Unbalanced Panels: Missing Observations Are Not Zero Covariances
In an unbalanced panel, let \(R_t\) denote the set of units observed at time \(t\). The conditional covariance matrix for the observed errors at that date is the corresponding submatrix of the covariance structure for all units. A pair absent from \(R_t\) contributes no observed same-date error pair at that time. Its covariance is unobserved, not thereby zero. This distinction matters when a panel’s pattern of observation changes across dates.
Worked Example: Reading a Common-Shock Pattern in an Unbalanced Panel
Suppose, hypothetically, \(u_{it}=f_t+\varepsilon_{it}\), with conditional factor variance \(0.2\), idiosyncratic conditional variance \(0.8\), and conditional zero covariance across distinct units and between the factor and idiosyncratic errors. At time 1, units \(1,2,4\) are observed; at time 2, units \(1,3,4\) are observed. Find the observed same-time covariance matrices and explain what can be said about units 2 and 3.
Each observed error has conditional variance \(0.2+0.8=1\). Each distinct pair observed at the same time has conditional covariance \(0.2\), the shared-factor contribution. In the listed unit order, the two observed covariance matrices are
Although the displayed matrices have the same entries, their row and column labels differ: \(\Sigma_1\) refers to units \(1,2,4\), and \(\Sigma_2\) to units \(1,3,4\). Units 2 and 3 are never jointly observed at the same time in this description, so their contemporaneous covariance cannot be read directly from these observed pairs. Under the stated common-factor model, it would be \(0.2\), but that is a model-based implication, not an observed covariance for the pair.
Classifying the Full Structure
A useful classification keeps the two index dimensions explicit. For a given model or covariance description, first ask whether errors for one unit covary across time. Then ask whether errors for different units covary, either at the same time or across time. Finally, inspect how cross-unit covariance is distributed: does it decline with distance or remain broadly shared across many units? This separates the existence of dependence from its spatial or cross-sectional reach.
State whether covariances are conditional on \(X\), and identify whether the pair has the same unit, same time, both, or neither.
For \(i=j\) and \(t\ne s\), determine whether \(\operatorname{Cov}(u_{it},u_{is}\mid X)\) is zero or has a time pattern.
For \(i\ne j\), examine covariance across observed unit pairs and, where relevant, across dates.
Decaying, localized covariance suggests weak dependence; broad covariance shared across many units is consistent with a common shock. In an unbalanced panel, distinguish unobserved pairs from zero-covariance pairs.
A panel can therefore have serial dependence only, cross-sectional dependence only, both, or neither, under a specified conditional covariance structure. A factor model can create both if its shocks are serially correlated; a separate serial process can coexist with a factor; and localized cross-unit covariance can exist without a pervasive factor. The labels are not mutually exclusive model classes.
Common Mistakes and a Practical Takeaway
- Confusing zero unconditional covariance with zero conditional covariance. A factor covariance formula conditional on \(X\) requires conditional restrictions. Unconditional independence or uncorrelatedness by itself does not rule out dependence after conditioning.
- Treating serial and cross-sectional dependence as the same feature. Covariance across dates for one unit and covariance across units are different entries in the panel covariance structure. Check both.
- Calling every cross-unit covariance a common shock. Local, distance-decaying covariance is also cross-sectional dependence. A shared shock is a possible explanation for broad covariance, not a conclusion established by one nonzero pair.
- Reading a missing pair as independent. In an unbalanced panel, if two units are not jointly observed, their covariance is unavailable from that pair at that time. Missingness does not set it to zero.
Check Your Understanding
Use the covariance indices and assumptions carefully when answering.
- If \(\operatorname{Cov}(u_{it},u_{i,t-1}\mid X)\ne0\) but \(\operatorname{Cov}(u_{it},u_{jt}\mid X)=0\) for every \(i\ne j\), which dependence pattern is present?
- In a conditional factor model, which conditional covariance restrictions are needed to reduce cross-unit covariance to the factor contribution alone?
- Why can covariance that decays geometrically with distance represent weak dependence even though nearby units are correlated?
- Two units are never observed together at the same date in an unbalanced panel. What can be concluded about their same-date covariance from that fact alone?
- Can a panel have both serial dependence and common-shock cross-sectional dependence? Describe one covariance feature that would indicate each.