Tutorials › Econometrics (Graduate) › Random-Effects Assumptions And Variance Components

Fixed and Random Effects · Tutorial 261 of 952

Random-Effects Assumptions And Variance Components

Learn how random-effects assumptions determine within-unit error correlation and when the model’s error structure is compatible with the regressors.

Intermediate 11 min read

What You'll Learn

  • Write the random-effects panel model as a sum of unit and idiosyncratic errors.
  • State the exogeneity conditions linking regressors to both error components.
  • Derive the error covariance matrix for a balanced panel.
  • Interpret the variance components and the within-unit intraclass correlation.
  • Identify how violations of the assumptions affect the random-effects model.

Why Decompose the Panel Error?

In a panel, the same unit is observed at several times. Outcomes for one person, firm, or region may therefore share a persistent unobserved influence: for example, a stable ability, management practice, or geographic feature. A model that treats all unit-time errors as unrelated misses this shared component. The random-effects model makes the source of that dependence explicit by separating a unit-level effect from an idiosyncratic error that varies over time.

This decomposition describes more than a covariance pattern. Its assumptions also determine whether the unit effect can be treated as uncorrelated with the regressors. That condition is central: a variance structure can be mathematically well defined even when the regressors violate the exogeneity needed for the random-effects model.

Definition: For unit \(i=1,\ldots,N\) observed at times \(t=1,\ldots,T\), the static random-effects model is $$ y_{it}=x_{it}'\beta+a_i+u_{it}. $$ Here \(y_{it}\) is the outcome, \(x_{it}\) is a \(k\)-vector of regressors, \(\beta\) is the slope vector, \(a_i\) is a time-invariant unit effect, and \(u_{it}\) is the idiosyncratic error. The composite error is \(v_{it}=a_i+u_{it}\).

Write \(X_i=(x_{i1},\ldots,x_{iT})\) for the complete regressor history of unit \(i\), and collect its errors in \(v_i=(v_{i1},\ldots,v_{iT})'\). The model does not require regressors to be constant over time, nor does it require the regressors to be uncorrelated with each other across periods. It does require restrictions on how the regressors relate to \(a_i\) and \(u_{it}\).

Exogeneity and Variance Assumptions

A standard random-effects specification imposes conditional mean restrictions on the full regressor history. Conditioning on \(X_i\), rather than only on the current \(x_{it}\), matters: a current error must not predict a regressor in another period in a way that violates strict exogeneity.

Random-effects assumptions: A common classical specification has the following conditions.
  • Unit-effect exogeneity: \(E(a_i\mid X_i)=0\). The unit effect has conditional mean zero at every regressor history. Independence of \(a_i\) and \(X_i\) is a stronger sufficient condition, but is not required by this conditional-mean statement.
  • Idiosyncratic strict exogeneity: \(E(u_{it}\mid X_i,a_i)=0\) for every \(t\). Thus the idiosyncratic error is mean-independent of the entire regressor history and the unit effect.
  • Variance components: conditional on \(X_i\) and \(a_i\), \(\operatorname{Var}(u_{it}\mid X_i,a_i)=\sigma_u^2\), the same for all units and periods, and \(\operatorname{Cov}(u_{it},u_{is}\mid X_i,a_i)=0\) when \(t\ne s\). The unit effect has variance \(\sigma_a^2\), not depending on \(X_i\).
  • Separate components and units: the unit effect and idiosyncratic errors have zero conditional covariance; errors from distinct units are uncorrelated. A common stronger formulation assumes independent sampling across units and independence between the two error components.

These assumptions allow \(a_i\) to vary across units; “random” does not mean that every unit has the same effect. They also allow the regressors to be serially correlated. What is restricted is their relationship to the unobserved effects and errors, not their own time-series pattern. The conditional-mean restrictions are often the most consequential: if a unit’s persistent unobserved trait is associated with its regressor history, then \(E(a_i\mid X_i)=0\) fails.

The homoskedasticity and no-serial-correlation conditions for \(u_{it}\) are assumptions about the idiosyncratic component, not about the composite error \(v_{it}\). In fact, even when the \(u_{it}\) are uncorrelated over time, the composite errors for the same unit are correlated because they share \(a_i\).

Deriving the Within-Unit Covariance Matrix

The covariance structure follows directly from the decomposition. For any two periods \(t\) and \(s\), expand the covariance of \(v_{it}=a_i+u_{it}\) and \(v_{is}=a_i+u_{is}\). The cross-component covariance terms vanish under the separate-components assumption.

$$ \begin{aligned} \operatorname{Cov}(v_{it},v_{is}\mid X_i) &=\operatorname{Var}(a_i\mid X_i) +\operatorname{Cov}(u_{it},u_{is}\mid X_i,a_i)\\ &=\begin{cases} \sigma_a^2+\sigma_u^2, & t=s,\\ \sigma_a^2, & t\ne s. \end{cases} \end{aligned} $$

For a balanced panel, let \(\mathbf{1}_T\) denote the \(T\)-vector of ones and \(I_T\) the \(T\times T\) identity matrix. The conditional covariance matrix of the composite error vector is therefore

$$ \Omega =\operatorname{Var}(v_i\mid X_i) =\sigma_u^2 I_T+\sigma_a^2\mathbf{1}_T\mathbf{1}_T'. $$

The diagonal elements are \(\sigma_a^2+\sigma_u^2\), and every off-diagonal element is \(\sigma_a^2\). The matrix is sometimes called compound symmetric: all periods have the same error variance, and every distinct pair of periods has the same covariance. This result describes the conditional covariance under the stated assumptions; it is not an assertion that observed outcomes themselves have equal correlations across periods, since outcomes also depend on the regressors.

Worked Example: Constructing the Covariance Matrix

Suppose a hypothetical balanced panel has \(T=3\), with unit-effect variance \(\sigma_a^2=9\) outcome-units squared and idiosyncratic variance \(\sigma_u^2=16\) outcome-units squared. Assume the random-effects variance conditions hold.

For any period, the composite-error variance is \(9+16=25\). For two different periods of the same unit, the covariance is \(9\), because the only shared error component is \(a_i\). Thus

$$ \Omega=16I_3+9\mathbf{1}_3\mathbf{1}_3' = \begin{pmatrix} 25&9&9\\ 9&25&9\\ 9&9&25 \end{pmatrix}. $$

The diagonal entries have units of outcome-units squared, as do the covariances. The positive off-diagonal entries express persistent within-unit dependence: a unit with a higher-than-average \(a_i\) tends to have a higher composite error in each of its three periods. Errors for different units have zero covariance under the assumed cross-unit condition.

Interpreting the Variance Components

The variance \(\sigma_a^2\) measures variation in the persistent unit component, while \(\sigma_u^2\) measures variation in period-specific idiosyncratic errors. Their sum is the total composite-error variance for a single observation. A useful summary of the implied dependence is the intraclass correlation, the correlation between two composite errors from distinct periods of the same unit.

Definition: Under the random-effects covariance assumptions, the within-unit intraclass correlation is $$ \rho=\operatorname{Corr}(v_{it},v_{is}) =\frac{\sigma_a^2}{\sigma_a^2+\sigma_u^2}, \qquad t\ne s. $$ When both variance components are nonnegative and their sum is positive, \(0\leq \rho\leq 1\).

The numerator is the covariance between two periods; the denominator is the product of their standard deviations, which are equal. This correlation is a feature of the composite errors, not necessarily the correlation of \(y_{it}\) and \(y_{is}\), because regressor values can also differ across periods.

Worked Example: Calculating the Intraclass Correlation

Consider a hypothetical panel with \(\sigma_a^2=4\) and \(\sigma_u^2=12\), each measured in squared outcome-units. The variance of a composite error in one period is \(4+12=16\), and the covariance between two periods for the same unit is \(4\).

Therefore,

$$ \rho=\frac{4}{4+12}=\frac{4}{16}=0.25. $$

Under these assumptions, the correlation between composite errors from two different periods of the same unit is \(0.25\). This does not mean that 25% of each observed outcome is caused by the unit effect. It is a ratio of error variances that summarizes the implied within-unit error dependence.

Checking Whether Regressors Satisfy the Assumptions

The variance decomposition alone does not establish that a random-effects model is appropriate. In particular, the condition \(E(a_i\mid X_i)=0\) rules out systematic association between the persistent unobserved component and the regressor history. A regressor may be highly persistent over time and still satisfy this restriction; conversely, even a simple time-invariant regressor can violate it if it is associated with \(a_i\).

Worked Example: A Regressor Associated With the Unit Effect

Suppose a hypothetical population contains two equally common types of units. For one type, the unit effect is \(a_i=-2\) and the regressor is \(x_{it}=0\) in every period. For the other type, \(a_i=2\) and \(x_{it}=1\) in every period. The values are measured on arbitrary scales. The idiosyncratic errors have conditional mean zero and meet the variance assumptions.

The unconditional means are \(E(a_i)=(-2+2)/2=0\) and \(E(x_{it})=(0+1)/2=0.5\). But the product mean is

$$ E(a_i x_{it})=\frac{(-2)(0)+(2)(1)}{2}=1. $$

Hence \(\operatorname{Cov}(a_i,x_{it})=E(a_ix_{it})-E(a_i)E(x_{it})=1-(0)(0.5)=1\), not zero. More directly, \(E(a_i\mid x_{it}=0)=-2\) and \(E(a_i\mid x_{it}=1)=2\), so \(E(a_i\mid X_i)=0\) fails. Even though the idiosyncratic errors are well behaved, the random-effects exogeneity condition on the unit effect is violated. The covariance formula for the errors can still describe their stipulated variance structure, but it does not repair this regressor-effect association.

The idiosyncratic strict-exogeneity assumption also deserves a careful check. It requires the conditional mean of \(u_{it}\) to be zero given regressors in every period, not merely the current regressor. For example, if a temporary shock \(u_{it}\) influences a later choice \(x_{i,t+1}\), then conditioning on the full regressor history may reveal information about \(u_{it}\). The strict-exogeneity condition can fail even if the current regressor is uncorrelated with the current error.

A Short Justification of the Matrix Form

The covariance formula can also be seen by writing the complete error vector as \(v_i=a_i\mathbf{1}_T+u_i\), where \(u_i=(u_{i1},\ldots,u_{iT})'\). Its variance is the sum of the component variance matrices when their covariance is zero. The unit effect is a scalar replicated in every period, so its contribution is \(\sigma_a^2\mathbf{1}_T\mathbf{1}_T'\). The idiosyncratic errors are uncorrelated with common variance, so their contribution is \(\sigma_u^2 I_T\). Thus

$$ \begin{aligned} \operatorname{Var}(v_i\mid X_i) &=\operatorname{Var}(a_i\mathbf{1}_T\mid X_i) +\operatorname{Var}(u_i\mid X_i,a_i)\\ &=\sigma_a^2\mathbf{1}_T\mathbf{1}_T' +\sigma_u^2 I_T. \end{aligned} $$

The first matrix has \(\sigma_a^2\) in every entry because the same scalar \(a_i\) enters every period. The identity matrix contributes \(\sigma_u^2\) only to the diagonal, since distinct-period idiosyncratic errors are uncorrelated. This decomposition explains both the diagonal variances and the off-diagonal covariances without relying on a memorized matrix pattern.

Common Mistakes and Why the Assumptions Matter

  • Assuming composite errors are independent over time. The idiosyncratic errors may be uncorrelated across periods, but the composite errors share \(a_i\), giving them covariance \(\sigma_a^2\).
  • Thinking random effects means the unit effect is unrelated to nothing in particular. The key restriction is specifically its conditional mean given the full regressor history. If that association is present, the standard random-effects exogeneity condition fails.
  • Checking only contemporaneous exogeneity. The condition on \(u_{it}\) is given the entire \(X_i\), including regressors from other periods. Feedback between shocks and future regressors can violate it.
  • Confusing an error correlation with an outcome correlation. The formula for \(\rho\) concerns \(v_{it}\) and \(v_{is}\). The outcomes also contain regressors, whose values and dependence can affect their relationship.

The assumptions matter because a correct description of within-unit dependence and a valid relationship between regressors and errors are separate requirements. The variance components determine the structure of \(\Omega\); the conditional-mean restrictions determine whether the regressors are exogenous to the unobserved components. Both parts must be considered when specifying a random-effects model.

Check Your Understanding

Use the model and assumptions in this tutorial to answer the following questions.

  1. For \(T=2\), write the random-effects covariance matrix in terms of \(\sigma_a^2\) and \(\sigma_u^2\).
  2. Why can \(u_{it}\) and \(u_{is}\) be uncorrelated for \(t\ne s\) while \(v_{it}\) and \(v_{is}\) remain correlated?
  3. State the distinction between \(E(a_i\mid X_i)=0\) and the stronger claim that \(a_i\) is independent of \(X_i\).
  4. If \(\sigma_a^2=6\) and \(\sigma_u^2=18\), calculate the within-unit intraclass correlation and interpret it.
  5. Explain how a temporary error at time \(t\) influencing a later regressor could conflict with the idiosyncratic strict-exogeneity condition.
Clinical Biostats