Tutorials › Econometrics (Graduate) › Boundary Cases Of The Random-Effects Transformation

Fixed and Random Effects · Tutorial 272 of 952

Boundary Cases Of The Random-Effects Transformation

Learn how variance components determine the random-effects transformation and why its limiting cases connect pooled OLS with within estimation.

Intermediate 10 min read

What You'll Learn

  • Define the quasi-demeaning parameter for a balanced panel and identify the variance components that determine it.
  • Derive the parameter by matching the transformed unit-mean error variance to the within-unit error variance.
  • Explain why a negligible unit effect yields the pooled-OLS transformation.
  • Explain why a dominant unit effect makes the transformed regression approach within estimation.
  • Calculate transformed slopes between the pooled and within limits and recognize what these limits do not establish.

Why the Boundary Cases Matter

Random-effects estimation applies a transformation that subtracts part of each unit’s time average from its observations. How much is subtracted depends on the relative sizes of the unit-effect and idiosyncratic error variances. When the unit effect contributes almost no variance, the transformation should do little; when it dominates, the transformation should remove almost all unit-level averages. These limiting cases clarify how random-effects estimation relates to pooled OLS and the within estimator.

The limits describe the behavior of the transformation and estimator, not a diagnostic test of the random-effects assumptions. In particular, a transformation that is close to within demeaning does not by itself establish that the unit effect is correlated with the regressors or that a fixed-effects interpretation is required.

Model and Quasi-Demeaning Parameter

Consider a balanced panel with \(N\) units and \(T\) observations per unit. Write the static panel model as

$$ y_{it}=x_{it}'\beta+a_i+u_{it}, \qquad i=1,\ldots,N,\quad t=1,\ldots,T. $$

Here \(y_{it}\) is the outcome, \(x_{it}\) is a vector of regressors, \(\beta\) is the slope vector, \(a_i\) is the time-invariant unit effect, and \(u_{it}\) is the idiosyncratic error. The variance-components assumptions used here are that \(a_i\) has mean zero and variance \(\sigma_a^2\), \(u_{it}\) has mean zero and variance \(\sigma_u^2>0\), and the unit effects and idiosyncratic errors are mutually uncorrelated. The idiosyncratic errors are uncorrelated across time and units. For the usual random-effects interpretation, the unit effects are also assumed uncorrelated with the regressors at all dates; the transformation alone does not guarantee this condition.

For any unit-level variable \(z_{it}\), let \(\bar z_i=T^{-1}\sum_{t=1}^{T}z_{it}\) denote its time average. The random-effects quasi-demeaning transformation is

$$ z_{it}^{*}=z_{it}-\theta\bar z_i, \qquad \theta=1-\sqrt{\frac{\sigma_u^2}{\sigma_u^2+T\sigma_a^2}}. $$

The same transformation is applied to the outcome and every regressor. Because \(\sigma_u^2>0\) and \(\sigma_a^2\geq 0\), the parameter satisfies \(0\leq\theta<1\) for finite variance components. A value near zero leaves observations nearly unchanged; a value near one nearly subtracts each unit’s full time average.

Definition: The quasi-demeaning parameter \(\theta\) is the fraction of each unit’s time average subtracted from each observation in the balanced-panel random-effects transformation. It depends on the ratio of unit-effect variance to idiosyncratic variance and on the number of observations \(T\) per unit.

Why This Value of \(\theta\) Appears

The formula can be justified by considering the covariance of a unit’s error vector. Write \(e_i=(a_i+u_{i1},\ldots,a_i+u_{iT})'\). Its covariance matrix is

$$ \Omega=\sigma_u^2 I_T+\sigma_a^2\mathbf{1}\mathbf{1}'. $$

The unit-mean direction, represented by \(\mathbf{1}\), has error variance \(\sigma_u^2+T\sigma_a^2\). Any direction that contrasts observations within the unit has variance \(\sigma_u^2\), because the common effect \(a_i\) cancels in a within-unit contrast. Let \(P=\mathbf{1}\mathbf{1}'/T\) denote projection onto the unit-mean direction. The transformation matrix \(I_T-\theta P\) leaves within-unit contrasts unchanged and multiplies the unit-mean direction by \(1-\theta\). Thus the transformed variance in that direction is \((1-\theta)^2(\sigma_u^2+T\sigma_a^2)\). Choosing \(\theta\) to make it equal to the within-direction variance gives

$$ (1-\theta)^2(\sigma_u^2+T\sigma_a^2)=\sigma_u^2, \qquad 1-\theta=\sqrt{\frac{\sigma_u^2}{\sigma_u^2+T\sigma_a^2}}, \qquad \theta=1-\sqrt{\frac{\sigma_u^2}{\sigma_u^2+T\sigma_a^2}}. $$

This equalization is the basis of the quasi-demeaning transformation for random-effects generalized least squares. It also makes the limiting cases transparent: as the variance contribution along the unit-mean direction changes, the amount of that direction retained in the transformed data changes.

Boundary Case 1: Negligible Unit-Effect Variance

If \(\sigma_a^2=0\), the unit effect has no variance contribution. Substitution into the formula gives

$$ \theta=1-\sqrt{\frac{\sigma_u^2}{\sigma_u^2}}=0. $$

The transformation then leaves every observation unchanged: \(z_{it}^{*}=z_{it}\). The transformed regression is the original pooled regression, so random-effects GLS reduces to pooled OLS under this boundary case. If \(\sigma_a^2\) is positive but small relative to \(\sigma_u^2\), \(\theta\) is small and the transformation is close to pooled OLS. The exact equality with pooled OLS applies at zero unit-effect variance; “close” at a small positive variance is an approximation, not an identity.

Worked Example: A Small Unit-Effect Variance

Suppose a hypothetical balanced panel has \(T=4\), \(\sigma_u^2=1\) outcome-squared units, and \(\sigma_a^2=0.01\) outcome-squared units. Calculate \(\theta\) and describe the transformation.

Substituting the variance components,

$$ \theta =1-\sqrt{\frac{1}{1+4(0.01)}} =1-\sqrt{\frac{1}{1.04}} \approx 1-0.98058 =0.01942. $$

Thus \(z_{it}^{*}=z_{it}-0.01942\bar z_i\): about 1.942% of each unit’s time average is subtracted. The transformation is close to the untransformed pooled regression. The displayed arithmetic is consistent at its shown precision: \(1-0.98058\) rounds to \(0.01942\).

Boundary Case 2: Unit-Effect Variance Dominates

For fixed positive \(\sigma_u^2\) and fixed \(T\), as \(\sigma_a^2/\sigma_u^2\) grows without bound,

$$ \theta =1-\frac{1}{\sqrt{1+T\sigma_a^2/\sigma_u^2}} \longrightarrow 1. $$

Consequently, \(z_{it}^{*}\) approaches \(z_{it}-\bar z_i\), the within-unit demeaned observation. The transformed regression therefore approaches the within regression for slopes identified by within-unit variation. A regressor that is constant over time for each unit has \(x_{it}-\bar x_i=0\), so its coefficient cannot be identified by the exact within regression. The intercept is likewise removed by full demeaning.

This is a limit as the variance ratio grows; it is not the same as saying that a finite, very large \(\sigma_a^2\) makes \(\theta\) exactly one. Nor does the limiting algebra establish the random-effects exogeneity condition. It describes what the transformation does as the unit-mean direction receives progressively less weight relative to within-unit contrasts.

Worked Example: A Dominant Unit-Effect Variance

Suppose another hypothetical balanced panel has \(T=4\), \(\sigma_u^2=1\), and \(\sigma_a^2=25\), all in outcome-squared units. Find the quasi-demeaning parameter.

The ratio \(\sigma_a^2/\sigma_u^2\) is 25, so

$$ \theta =1-\sqrt{\frac{1}{1+4(25)}} =1-\sqrt{\frac{1}{101}} \approx 1-0.09950 =0.90050. $$

The transformed observation is \(z_{it}^{*}=z_{it}-0.90050\bar z_i\). It retains about 9.950% of the unit average, rather than removing it completely. This is substantially closer to within demeaning than to pooled OLS, but it is still not exactly the within transformation.

Intermediate Values Connect the Two Estimators

Between the boundaries, the transformed regression retains some unit-level mean variation and removes some of it. The following example makes that interpolation explicit. With an intercept \(c\), the transformed equation has intercept \((1-\theta)c\), since a constant transforms to \(1-\theta\). At \(\theta=1\), this intercept vanishes.

Worked Example: A Transformed Slope Between the Limits

Consider the following hypothetical two-unit, two-period panel. There is one regressor \(x\), and the outcome and regressor are measured in their stated units.

UnitPeriod\(x_{it}\)\(y_{it}\)
A101
A225
B124
B248

Assume the variance ratio is \(\sigma_a^2/\sigma_u^2=1.5\). Since \(T=2\),

$$ \theta=1-\sqrt{\frac{1}{1+2(1.5)}}=1-\sqrt{\frac14}=0.5. $$

For unit A, \(\bar x_A=1\) and \(\bar y_A=3\); for unit B, \(\bar x_B=3\) and \(\bar y_B=6\). The transformed observations are therefore \(x^*=( -0.5,\,1.5,\,0.5,\,2.5)\) and \(y^*=(-0.5,\,3.5,\,1,\,5)\), in the table’s row order. The slope in an OLS regression with an intercept is the centered cross-product divided by the centered regressor sum of squares. Here the transformed means are \(\bar x^*=1\) and \(\bar y^*=2.25\), giving

$$ \hat\beta^* =\frac{\sum (x_{it}^*-\bar x^*)(y_{it}^*-\bar y^*)} {\sum (x_{it}^*-\bar x^*)^2} =\frac{9.5}{5} =1.9. $$

For comparison, pooled OLS on the original observations has centered cross-product \(14\) and regressor sum of squares \(8\), so its slope is \(14/8=1.75\). The within-demeaned observations have cross-product \(8\) and regressor sum of squares \(4\), giving the within slope \(8/4=2\). The transformed slope of \(1.9\) lies between these two endpoints. In this constructed example, this can also be checked from the decomposition into within and between variation: the transformed cross-product is \(8+6(1-\theta)^2=9.5\), and the transformed regressor sum of squares is \(4+4(1-\theta)^2=5\).

Limits and Interpretation

For fixed \(T\), the parameter depends on the variance ratio through

$$ \theta=1-\frac{1}{\sqrt{1+T\sigma_a^2/\sigma_u^2}}. $$

This expression summarizes the transition. A zero ratio gives \(\theta=0\); an increasingly large ratio makes \(\theta\) approach one. Increasing \(T\) also increases \(\theta\) for a fixed positive variance ratio: the unit-mean component accumulates the common effect across more observations, so the GLS transformation removes a larger fraction of the unit average. This does not mean the transformed data become fully demeaned for a fixed finite \(T\) and finite variance ratio.

The endpoints are useful as conceptual checks on a calculation and as guides to what the transformed regression emphasizes. Near zero, unit-level differences remain largely in the data, as in pooled OLS. Near one, persistent differences across units contribute little to identifying slopes, and within-unit changes dominate. The two estimators may nevertheless differ for reasons beyond this interpolation, including differences in identifying variation and in the assumptions needed for interpretation.

Key takeaway: In a balanced panel, \(\theta=1-\sqrt{\sigma_u^2/(\sigma_u^2+T\sigma_a^2)}\). Zero unit-effect variance gives the pooled-OLS transformation, while a unit-effect variance that dominates idiosyncratic variance makes the transformed slope regression approach within estimation.

Common Mistakes

  • Treating a near-boundary value as the boundary itself. A value such as \(\theta=0.90050\) still subtracts less than the full unit mean. Only the limit \(\theta\to1\) is full demeaning.
  • Reversing the variance ratio. A larger \(\sigma_a^2/\sigma_u^2\) raises \(\theta\); a larger \(\sigma_u^2\) relative to \(\sigma_a^2\) lowers it. This follows directly from the expression \(1-1/\sqrt{1+T\sigma_a^2/\sigma_u^2}\).
  • Claiming that the boundary proves an assumption. A transformation near within demeaning does not prove that the unit effect is correlated with regressors. The parameter describes variance components, not the validity of an exogeneity condition.
  • Assuming every coefficient survives full demeaning. A time-invariant regressor becomes zero after subtracting its unit mean, so its coefficient is not identified from within-unit variation alone.

Check Your Understanding

Use the definitions and limiting arguments above to answer these questions.

  1. For a balanced panel with \(\sigma_a^2=0\), what is \(\theta\), and which regression transformation results?
  2. With \(T=3\), \(\sigma_a^2/\sigma_u^2=1\), calculate \(\theta\) to four significant figures.
  3. As \(\sigma_a^2/\sigma_u^2\) grows without bound, what happens to \(z_{it}^{*}\)?
  4. Why does full within demeaning prevent estimation of a coefficient on a regressor that is constant within each unit?
  5. Does observing a value of \(\theta\) close to one establish that the unit effect is correlated with the regressors? Explain.
Clinical Biostats