In statistics, a fixed effects model is a statistical model in which the model parameters are fixed or non-random quantities. This is in contrast to random effects models and mixed models in which all or some of the model parameters are random variables. In many applications including econometrics[1] and biostatistics[2][3][4][5][6] a fixed effects model refers to a regression model in which the group means are fixed (non-random) as opposed to a random effects model in which the group means are a random sample from a population.[7][6] Generally, data can be grouped according to several observed factors. The group means could be modeled as fixed or random effects for each grouping. In a fixed effects model each group mean is a group-specific fixed quantity.
In panel data where longitudinal observations exist for the same subject, fixed effects represent the subject-specific means. In panel data analysis the term fixed effects estimator (also known as the within estimator) is used to refer to an estimator for the coefficients in the regression model including those fixed effects (one time-invariant intercept for each subject).
Such models assist in controlling for omitted variable bias due to unobserved heterogeneity when this heterogeneity is constant over time. This heterogeneity can be removed from the data through differencing, for example by subtracting the group-level average over time, or by taking a first difference which will remove any time invariant components of the model.
There are two common assumptions made about the individual specific effect: the random effects assumption and the fixed effects assumption. The random effects assumption is that the individual-specific effects are uncorrelated with the independent variables. The fixed effect assumption is that the individual-specific effects are correlated with the independent variables. If the random effects assumption holds, the random effects estimator is more efficient than the fixed effects estimator. However, if this assumption does not hold, the random effects estimator is not consistent. The Durbin–Wu–Hausman test is often used to discriminate between the fixed and the random effects models.[8][9]
Consider the linear unobserved effects model for N {\displaystyle N} observations and T {\displaystyle T} time periods:
Where:
Unlike X i t {\displaystyle X_{it}} , α i {\displaystyle \alpha _{i}} cannot be directly observed.
Unlike the random effects model where the unobserved α i {\displaystyle \alpha _{i}} is independent of X i t {\displaystyle X_{it}} for all t = 1 , . . . , T {\displaystyle t=1,...,T} , the fixed effects (FE) model allows α i {\displaystyle \alpha _{i}} to be correlated with the regressor matrix X i t {\displaystyle X_{it}} . Strict exogeneity with respect to the idiosyncratic error term u i t {\displaystyle u_{it}} is still required.
Since α i {\displaystyle \alpha _{i}} is not observable, it cannot be directly controlled for. The FE model eliminates α i {\displaystyle \alpha _{i}} by de-meaning the variables using the within transformation:
where y ¯ i = 1 T ∑ t = 1 T y i t {\displaystyle {\overline {y}}_{i}={\frac {1}{T}}\sum \limits _{t=1}^{T}y_{it}} , X ¯ i = 1 T ∑ t = 1 T X i t {\displaystyle {\overline {X}}_{i}={\frac {1}{T}}\sum \limits _{t=1}^{T}X_{it}} , and u ¯ i = 1 T ∑ t = 1 T u i t {\displaystyle {\overline {u}}_{i}={\frac {1}{T}}\sum \limits _{t=1}^{T}u_{it}} .
Since α i {\displaystyle \alpha _{i}} is constant, α i ¯ = α i {\displaystyle {\overline {\alpha _{i}}}=\alpha _{i}} and hence the effect is eliminated. The FE estimator β ^ F E {\displaystyle {\hat {\beta }}_{FE}} is then obtained by an OLS regression of y ¨ {\displaystyle {\ddot {y}}} on X ¨ {\displaystyle {\ddot {X}}} .
At least three alternatives to the within transformation exist with variations:
Finally, each of the above alternatives can be improved if the series-specific estimation is linear (within a nonlinear model), in which case the direct linear solution for individual series can be programmed in as part of the nonlinear model definition.[15]
An alternative to the within transformation is the first difference transformation, which produces a different estimator. For t = 2 , … , T {\displaystyle t=2,\dots ,T} :
The FD estimator β ^ F D {\displaystyle {\hat {\beta }}_{FD}} is then obtained by an OLS regression of Δ y i t {\displaystyle \Delta y_{it}} on Δ X i t {\displaystyle \Delta X_{it}} .
When T = 2 {\displaystyle T=2} , the first difference and fixed effects estimators are numerically equivalent. For T > 2 {\displaystyle T>2} , they are not. If the error terms u i t {\displaystyle u_{it}} are homoskedastic with no serial correlation, the fixed effects estimator is more efficient than the first difference estimator. If u i t {\displaystyle u_{it}} follows a random walk, however, the first difference estimator is more efficient.[16]
For the special two period case ( T = 2 {\displaystyle T=2} ), the fixed effects (FE) estimator and the first difference (FD) estimator are numerically equivalent. This is because the FE estimator effectively "doubles the data set" used in the FD estimator. To see this, establish that the fixed effects estimator is: F E T = 2 = [ ( x i 1 − x ¯ i ) ( x i 1 − x ¯ i ) ′ + ( x i 2 − x ¯ i ) ( x i 2 − x ¯ i ) ′ ] − 1 [ ( x i 1 − x ¯ i ) ( y i 1 − y ¯ i ) + ( x i 2 − x ¯ i ) ( y i 2 − y ¯ i ) ] {\displaystyle {FE}_{T=2}=\left[(x_{i1}-{\bar {x}}_{i})(x_{i1}-{\bar {x}}_{i})'+(x_{i2}-{\bar {x}}_{i})(x_{i2}-{\bar {x}}_{i})'\right]^{-1}\left[(x_{i1}-{\bar {x}}_{i})(y_{i1}-{\bar {y}}_{i})+(x_{i2}-{\bar {x}}_{i})(y_{i2}-{\bar {y}}_{i})\right]}
Since each ( x i 1 − x ¯ i ) {\displaystyle (x_{i1}-{\bar {x}}_{i})} can be re-written as ( x i 1 − x i 1 + x i 2 2 ) = x i 1 − x i 2 2 {\displaystyle (x_{i1}-{\dfrac {x_{i1}+x_{i2}}{2}})={\dfrac {x_{i1}-x_{i2}}{2}}} , we'll re-write the line as:
F E T = 2 = [ ∑ i = 1 N x i 1 − x i 2 2 x i 1 − x i 2 2 ′ + x i 2 − x i 1 2 x i 2 − x i 1 2 ′ ] − 1 [ ∑ i = 1 N x i 1 − x i 2 2 y i 1 − y i 2 2 + x i 2 − x i 1 2 y i 2 − y i 1 2 ] {\displaystyle {FE}_{T=2}=\left[\sum _{i=1}^{N}{\dfrac {x_{i1}-x_{i2}}{2}}{\dfrac {x_{i1}-x_{i2}}{2}}'+{\dfrac {x_{i2}-x_{i1}}{2}}{\dfrac {x_{i2}-x_{i1}}{2}}'\right]^{-1}\left[\sum _{i=1}^{N}{\dfrac {x_{i1}-x_{i2}}{2}}{\dfrac {y_{i1}-y_{i2}}{2}}+{\dfrac {x_{i2}-x_{i1}}{2}}{\dfrac {y_{i2}-y_{i1}}{2}}\right]}
Gary Chamberlain's method, a generalization of the within estimator, replaces α i {\displaystyle \alpha _{i}} with its linear projection onto the explanatory variables. Writing the linear projection as:
this results in the following equation:
which can be estimated by minimum distance estimation.[17]
Need to have more than one time-variant regressor ( X {\displaystyle X} ) and time-invariant regressor ( Z {\displaystyle Z} ) and at least one X {\displaystyle X} and one Z {\displaystyle Z} that are uncorrelated with α i {\displaystyle \alpha _{i}} .
Partition the X {\displaystyle X} and Z {\displaystyle Z} variables such that X = [ X 1 i t T N × K 1 ⋮ X 2 i t T N × K 2 ] Z = [ Z 1 i t T N × G 1 ⋮ Z 2 i t T N × G 2 ] {\displaystyle {\begin{array}{c}X=[{\underset {TN\times K1}{X_{1it}}}\vdots {\underset {TN\times K2}{X_{2it}}}]\\Z=[{\underset {TN\times G1}{Z_{1it}}}\vdots {\underset {TN\times G2}{Z_{2it}}}]\end{array}}} where X 1 {\displaystyle X_{1}} and Z 1 {\displaystyle Z_{1}} are uncorrelated with α i {\displaystyle \alpha _{i}} . Need K 1 > G 2 {\displaystyle K1>G2} .
Estimating γ {\displaystyle \gamma } via OLS on d i ^ = Z i γ + φ i t {\displaystyle {\widehat {di}}=Z_{i}\gamma +\varphi _{it}} using X 1 {\displaystyle X_{1}} and Z 1 {\displaystyle Z_{1}} as instruments yields a consistent estimate.
When there is input uncertainty for the y {\displaystyle y} data, δ y {\displaystyle \delta y} , then the χ 2 {\displaystyle \chi ^{2}} value, rather than the sum of squared residuals, should be minimized.[18] This can be directly achieved from substitution rules:
then the values and standard deviations for β {\displaystyle \mathbf {\beta } } and α i {\displaystyle \alpha _{i}} can be determined via classical ordinary least squares analysis and variance-covariance matrix.
Random effects estimators may be inconsistent sometimes in the long time series limit, if the random effects are misspecified (i.e. the model chosen for the random effects is incorrect). However, the fixed effects model may still be consistent in some situations. For example, if the time series being modeled is not stationary, random effects models assuming stationarity may not be consistent in the long-series limit. One example of this is if the time series has an upward trend. Then, as the series becomes longer, the model revises estimates for the mean of earlier periods upwards, giving increasingly biased predictions of coefficients. However, a model with fixed time effects does not pool information across time, and as a result earlier estimates will not be affected.
In situations like these where the fixed effects model is known to be consistent, the Durbin-Wu-Hausman test can be used to test whether the random effects model chosen is consistent. If H 0 {\displaystyle H_{0}} is true, both β ^ R E {\displaystyle {\widehat {\beta }}_{RE}} and β ^ F E {\displaystyle {\widehat {\beta }}_{FE}} are consistent, but only β ^ R E {\displaystyle {\widehat {\beta }}_{RE}} is efficient. If H a {\displaystyle H_{a}} is true the consistency of β ^ R E {\displaystyle {\widehat {\beta }}_{RE}} cannot be guaranteed.