16.2 Fixed effects

Treat the \(\alpha _i\) as parameters to be estimated, one for each unit. The time-invariant \(z_i\) are then collinear with the unit intercepts and drop out, so write the model as \(y_{it} = x_{it}'\beta + \alpha _i + \varepsilon _{it}\), or in stacked form \(Y = X\beta + D\alpha + \varepsilon \), where \(D\) is the \(NT \times N\) matrix of unit dummies.

Theorem 16.2.1. The least squares coefficient of \(X\) in the regression of \(Y\) on \(X\) and \(D\) (the least squares dummy variable estimator) is the within estimator \[ b_{\text {FE}} = \Bigl (\sum _{i,t}\tilde x_{it}\tilde x_{it}'\Bigr )^{-1}\sum _{i,t}\tilde x_{it}\tilde y_{it}, \qquad \tilde x_{it} = x_{it} - \bar x_i, \quad \tilde y_{it} = y_{it} - \bar y_i, \] where \(\bar x_i\) and \(\bar y_i\) are the unit means. Under strict exogeneity it is unbiased, with \(\Var (b_{\text {FE}} \mid X) = \sigma _\varepsilon ^2(\tilde X'\tilde X)^{-1}\) when the \(\varepsilon _{it}\) are homoscedastic and uncorrelated, and \(\sigma _\varepsilon ^2\) is estimated without bias by \(\tilde e'\tilde e/(NT - N - k)\), where \(\tilde e\) are the within residuals.

Proof. By the Frisch–Waugh–Lovell Theorem 6.4.1, the coefficient of \(X\) is that of the regression of \(M_DY\) on \(M_DX\), where \(M_D = I - D(D'D)^{-1}D'\). Since \(D'D = TI_N\) and \(D'Y\) holds the unit totals, \(D(D'D)^{-1}D'Y\) replaces each \(y_{it}\) by \(\bar y_i\), so \(M_DY = \tilde Y\), and likewise \(M_DX = \tilde X\). Next, \(\tilde Y = \tilde X\beta + M_D\varepsilon \), because \(M_DD = 0\), so \(b_{\text {FE}} - \beta = (\tilde X'\tilde X)^{-1}\tilde X'\varepsilon \), whose conditional mean is zero under strict exogeneity, since each \(\tilde x_{it}\) depends on the regressors of all periods. Its variance is \(\sigma _\varepsilon ^2(\tilde X'\tilde X)^{-1}\), using \(\tilde X'\varepsilon = \tilde X'M_D\varepsilon \) and \(M_D\) idempotent. Finally the residuals of the full regression are \(M\varepsilon \), where \(M\) is the residual maker for \([X\ D]\), of rank \(NT - N - k\), so \(E(\tilde e'\tilde e) = \sigma _\varepsilon ^2(NT - N - k)\) by Theorem 6.2.2. □

The degrees-of-freedom correction matters. Software that runs the demeaned regression as an ordinary regression divides by \(NT - k\), ignoring the \(N\) means that were estimated, and understates the standard errors by the factor \(\sqrt {(NT - N - k)/(NT - k)}\); with \(T = 2\) that is about \(0.71\). The individual effects themselves are estimated by \(\hat \alpha _i = \bar y_i - \bar x_i'b_{\text {FE}}\), but with \(T\) fixed they are not consistent, since each rests on only \(T\) observations.

Fixed effects estimates the effect of \(x\) from changes within units: a worker’s wage when trained compared with the same worker’s wage when not. Two consequences follow. The coefficients of time-invariant variables cannot be estimated. And variables that change little over time are estimated imprecisely, and measurement error in them is magnified, because the within variation of the signal is small relative to that of the error.

First differences

Differencing also removes \(\alpha _i\): \(\Delta y_{it} = \Delta x_{it}'\beta + \Delta \varepsilon _{it}\), \(t = 2, \dots , T\), and least squares on the differenced data is the first-difference estimator.

Theorem 16.2.2. When \(T = 2\), the first-difference and fixed effects estimators are identical.

Proof. With \(T = 2\), \(x_{i1} - \bar x_i = -\frac 12\Delta x_{i2}\) and \(x_{i2} - \bar x_i = \frac 12\Delta x_{i2}\), and the same for \(y\). Hence \(\sum _t\tilde x_{it}\tilde x_{it}' = \frac 12\Delta x_{i2}\Delta x_{i2}'\) and \(\sum _t\tilde x_{it}\tilde y_{it} = \frac 12\Delta x_{i2}\Delta y_{i2}\), and the factors \(\frac 12\) cancel in \(b_{\text {FE}}\), leaving \(\bigl (\sum _i\Delta x_{i2}\Delta x_{i2}'\bigr )^{-1}\sum _i\Delta x_{i2}\Delta y_{i2}\). □

For \(T > 2\) the two differ, and both are consistent under strict exogeneity. Fixed effects is efficient if the \(\varepsilon _{it}\) are serially uncorrelated; first differences is efficient if the \(\varepsilon _{it}\) follow a random walk, so that the \(\Delta \varepsilon _{it}\) are uncorrelated. A marked difference between them suggests a failure of strict exogeneity. Time effects common to all units, such as the business cycle, are handled by adding period dummies (two-way fixed effects).

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.