Why Add Unit-Specific Regressor Means?
A random-effects panel model is useful when it represents persistent differences across units with a unit effect. Its standard exogeneity condition, however, requires that this effect be uncorrelated with the regressors over time. If units with persistently high values of a regressor also tend to have systematically different unobserved characteristics, that condition is questionable. For example, a firm’s long-run investment level may be related to persistent management quality that is not observed in the data.
Mundlak’s correlated random-effects specification makes this relationship explicit in a structured way. It models the unit effect as partly predictable from the unit-specific averages of the time-varying regressors, leaving a residual unit effect that satisfies a random-effects exogeneity condition. The means are therefore not merely extra summaries: they are terms in the outcome equation that describe how the modeled part of the unit effect varies with the regressor history.
Model and Assumptions
Begin with a static panel outcome equation, $$ y_{it}=x_{it}'\beta+c_i+u_{it}, $$ where \(y_{it}\) is the outcome for unit \(i\) at time \(t\), \(\beta\) is the vector of regressor coefficients, \(c_i\) is a time-constant unit effect, and \(u_{it}\) is a time-varying disturbance. The vector \(x_{it}\) contains the time-varying regressors whose relationship with \(c_i\) is to be modeled.
The Mundlak specification assumes that the conditional mean of the unit effect is linear in the unit-specific regressor means: $$ E(c_i\mid X_i)=\bar{x}_i'\pi, $$ where \(X_i\) denotes the full observed history of the time-varying regressors for unit \(i\). Equivalently, write \(c_i=\bar{x}_i'\pi+a_i\), with \(E(a_i\mid X_i)=0\). The outcome equation becomes $$ y_{it}=x_{it}'\beta+\bar{x}_i'\pi+a_i+u_{it}. $$ The mean term is constant across periods for a given unit, while \(x_{it}\) may change over time.
This is a modeling restriction, not a guarantee that every possible relationship between \(c_i\) and the regressor history has been captured. In particular, the specification assumes that the conditional mean of \(c_i\) depends on the history through the included means in the stated linear form. For the remaining random-effects interpretation, one requires \(E(a_i\mid X_i)=0\). A common strict-exogeneity condition for the idiosyncratic disturbance is \(E(u_{it}\mid X_i,a_i)=0\) for each observed period. Inference also requires a suitable account of the error covariance; the mean specification alone does not determine standard errors.
The means are calculated for each unit from its observed periods. In an unbalanced panel, \(T_i\) and the set of observed periods can differ across units, so the averaging rule should be stated and applied consistently. The standard construction uses means of the time-varying regressors included in \(x_{it}\). A time-invariant regressor has the same value in every period for a unit, so its unit-specific mean duplicates the regressor; it is not added again as a separate mean term.
Worked Example: Building the Mean Terms
Consider a hypothetical balanced panel with three units observed in two periods. The time-varying regressor is \(x_{it}\), measured in hundreds of labor hours. Calculate each unit’s mean and write the Mundlak equation for unit A using illustrative values \(\beta=0.8\) and \(\pi=0.3\).
| Unit | \(x_{i1}\) | \(x_{i2}\) |
|---|---|---|
| A | 2 | 4 |
| B | 5 | 7 |
| C | 1 | 3 |
For unit A, \(\bar{x}_A=(2+4)/2=3\). For B, \(\bar{x}_B=(5+7)/2=6\), and for C, \(\bar{x}_C=(1+3)/2=2\). The model for each observation is \(y_{it}=\beta x_{it}+\pi\bar{x}_i+a_i+u_{it}\), with an intercept omitted here for simplicity.
For unit A in period 1, the regressor and mean contributions are $$ 0.8(2)+0.3(3)=1.6+0.9=2.5. $$ Thus \(y_{A1}=2.5+a_A+u_{A1}\). In period 2, they are $$ 0.8(4)+0.3(3)=3.2+0.9=4.1, $$ so \(y_{A2}=4.1+a_A+u_{A2}\). The mean term \(0.9\) is the same in both periods for unit A; the period-specific contribution from \(x_{it}\) changes.
How the Means Represent Correlation
The point of the decomposition is visible in \(c_i=\bar{x}_i'\pi+a_i\). If units with larger regressor means tend to have larger unit effects, the \(\bar{x}_i'\pi\) component can express that pattern. The residual \(a_i\) represents the part of the unit effect not explained by those means. Under \(E(a_i\mid X_i)=0\), that residual is conditionally mean-independent of the regressor history, even though the original \(c_i\) need not be.
For a scalar regressor, the covariance implication can be displayed directly. If the residual is uncorrelated with the regressors, then $$ \operatorname{Cov}(x_{it},c_i) =\operatorname{Cov}(x_{it},\pi\bar{x}_i+a_i) =\pi\operatorname{Cov}(x_{it},\bar{x}_i). $$ The last equality uses \(\operatorname{Cov}(x_{it},a_i)=0\). Thus, when \(\pi\) is nonzero and the current regressor is associated with its unit mean, the original unit effect can be correlated with the regressor. The added mean term represents that modeled source of correlation; it does not make the original unit effect disappear.
Worked Example: A Mean-Related Unit Effect
Suppose a hypothetical balanced panel has two observations per unit. For three units, the regressor values are \((1,3)\), \((4,6)\), and \((7,9)\). Their means are \(2\), \(5\), and \(8\), respectively. Suppose the unit effects follow \(c_i=0.4\bar{x}_i+a_i\), with residuals \(a_i=0.1,-0.2,0.1\).
The implied unit effects are calculated as follows: $$ c_1=0.4(2)+0.1=0.9,\qquad c_2=0.4(5)-0.2=1.8,\qquad c_3=0.4(8)+0.1=3.3. $$ The unit with the largest mean regressor value also has the largest modeled unit effect. The residuals are deviations around the mean-based component, rather than additional period-specific regressors.
The connection can also be checked in this small set of units. The sample mean of \(\bar{x}_i\) is \(5\), and the sample mean of \(c_i\) is \(2\). Their sample covariance is $$ \frac{(2-5)(0.9-2)+(5-5)(1.8-2)+(8-5)(3.3-2)}{3-1} =\frac{3.3+0+3.9}{2}=3.6. $$ The sample variance of \(\bar{x}_i\) is \(\{(2-5)^2+(5-5)^2+(8-5)^2\}/2=9\). The sample covariance of \(\bar{x}_i\) with \(a_i\) is $$ \frac{(-3)(0.1)+(0)(-0.2)+(3)(0.1)}{2}=0. $$ Consequently, the covariance between the mean and the unit effect is \(0.4(9)+0=3.6\), matching the direct calculation. This illustrates how the mean term can account for a relationship between regressor history and unit effect.
Interpreting the Added Coefficients
In the equation \(y_{it}=x_{it}'\beta+\bar{x}_i'\pi+a_i+u_{it}\), \(\beta\) is the coefficient vector on the period-specific regressors conditional on the included unit means. The vector \(\pi\) describes how the conditional mean of the unit effect varies with those means under the model. Its components are not automatically causal effects: they are features of the specified conditional-mean relationship.
For example, if \(x_{it}\) is measured in hundreds of labor hours, then its unit mean has the same units, and the coefficient \(\pi\) has units of outcome per hundred labor hours. Its interpretation concerns differences in the modeled unit effect associated with differences in long-run regressor levels, holding the other modeled terms fixed. It should not be described as the causal effect of changing a unit’s long-run average.
Worked Example: Calculating a Conditional Outcome Component
Suppose a hypothetical outcome, measured in thousands of dollars, follows \(y_{it}=1.2+0.5x_{it}+0.3\bar{x}_i+a_i+u_{it}\), where \(x_{it}\) is measured in hundreds of labor hours. For a unit with \(\bar{x}_i=5\), \(a_i=0.2\), and period-1 value \(x_{i1}=4\), calculate the conditional outcome component excluding \(u_{i1}\).
Substitute the values into the equation: $$ 1.2+0.5(4)+0.3(5)+0.2 =1.2+2.0+1.5+0.2=4.9. $$ The conditional component is \(4.9\) thousand dollars; the realized outcome also includes \(u_{i1}\). The unit effect in this example is \(c_i=0.3(5)+0.2=1.7\) thousand dollars. In period 2, if \(x_{i2}=6\) while the unit mean and residual unit effect stay the same, the corresponding component is $$ 1.2+0.5(6)+0.3(5)+0.2=5.9 $$ thousand dollars. This calculation illustrates the model’s terms; it does not estimate their coefficients or establish a causal interpretation.
Specification Checks and Common Pitfalls
Before interpreting a fitted correlated random-effects equation, verify that the mean terms correspond to the time-varying regressors whose relationship with the unit effect is being modeled. Also check that the units and observations used to compute each mean are clear. If the conditional mean of \(c_i\) depends on omitted aspects of the regressor history, adding the listed means may not fully represent that dependence.
- Assuming the ordinary random-effects condition still holds for \(c_i\). The Mundlak specification allows \(c_i\) to be related to regressor means. It instead requires the residual component \(a_i\) to satisfy the stated exogeneity condition.
- Adding means without interpreting them. A unit mean is a unit-level regressor, constant over time. Its coefficient describes the modeled relationship with the unit effect, not a period-specific effect.
- Treating mean terms as a causal remedy. Including means does not by itself remove all confounding or prove that the conditional-mean form is correct. The assumptions and the substantive design still matter.
- Duplicating a time-invariant regressor. Its within-unit mean equals the regressor itself. Including both creates exact duplication rather than an additional piece of information.
A useful justification for the model’s structure is obtained simply by substitution. Begin with the panel equation containing \(c_i\), impose \(c_i=\bar{x}_i'\pi+a_i\), and replace \(c_i\) in every period: $$ y_{it}=x_{it}'\beta+\bar{x}_i'\pi+a_i+u_{it}. $$ Because \(\bar{x}_i\) does not vary with \(t\), it captures a unit-level component related to the regressor history, while \(x_{it}\) retains its period-specific variation. The validity of this representation depends on the conditional-mean restriction, not on the algebra alone.
Check Your Understanding
Answer each question using the Mundlak specification and its assumptions.
- For a unit observed with regressor values \(2, 5,\) and \(8\), calculate its unit-specific mean.
- Write the Mundlak model when the original equation is \(y_{it}=x_{it}'\beta+c_i+u_{it}\), and define each new term.
- In a scalar-regressor model, explain why a nonzero coefficient on \(\bar{x}_i\) can correspond to correlation between \(x_{it}\) and \(c_i\).
- What exogeneity condition is imposed on the residual unit effect \(a_i\) after the unit means are included?
- Why is it redundant to add the unit-specific mean of a time-invariant regressor as a separate term?