|
Statistics and Algorithms / Panel and Grouped Data / Fixed and Random Effects |
The basic regression model for a (balanced) panel data set is
\begin{equation} y_{it} = X_{it} \beta + u_{it} ;i = 1, \ldots ,N;{\rm{ }}t = 1, \ldots ,T \end{equation}
These two types of estimators are designed to handle the systematic tendency of \(u_{it}\) to be higher for some individuals than for others (individual effects) and possibly higher for some time periods than for others (time effects). The EFFECTS option is used to indicate which effects to include: the choices are INDIVIDUAL (most common), TIME and BOTH.
The fixed effects estimator does this by (in effect) using a separate intercept for each individual or time period. Since \(N\) is usually large, we actually implement it either by subtracting out individual and/or time means using the instruction PANEL and then doing LINREG, or by using the PREGRESS instruction.
The random effects estimator is based upon the following decomposition of \(u_{it}\):
\begin{equation} u_{it} = \varepsilon _i + \lambda _t + \eta _{it} \end{equation}
where \(\varepsilon\) is the individual effect, \(\lambda\) the time effect, and \(\eta \) the purely random effect. \(\beta\) is estimated by GLS using the structure imposed upon \(u_{it}\) by this assumption. There have been many different algorithms proposed for estimating the component variances for the random effects, and the results for the regression depend upon how those are chosen. On PREGRESS, the choice for this is controlled by the VCOMP and CORRECTION options.
A Comparison
There are advantages and disadvantages to each treatment of the individual effects. A fixed effects model cannot estimate a coefficient on any time-invariant regressor, such as sex, schooling, etc., since the individual intercepts are free to take any value. By contrast, the individual effect in a random effects model is part of the error term, so it must be uncorrelated with the regressors. This means, for example, that a systematic tendency to see higher values for those with higher levels of schooling will be reflected in the coefficient on schooling.
On the flip side, because the random effects model treats the individual effect as part of the error term, it suffers from the possibility of bias due to a correlation between it and regressors (such as between unobservable talent and observable schooling).
See the discussion of these points in Hausman and Taylor (1981).
Implementation
The instruction PREGRESS (Panel Regress) estimates both of these. This is similar in syntax to LINREG, but you choose METHOD=FIXED or METHOD=RANDOM and which type of effects to allow: EFFECTS=INDIV, TIME or BOTH. For random effects, PREGRESS first runs a fixed effects regression and estimates the variances of the components from the fixed effects residuals. You can, however, override this and provide your own variance estimates using the VINDIV, VTIME and VRANDOM options.
Example
PANEL.RPF estimates a model using several different methods using PREGRESS. It also demonstrates how the equivalent estimators to fixed and random effects can be done using least squares with dummy variables and with panel data transformations. In addition to fixed and random effects estimators, it includes several others (first differences and SUR).
Copyright © 2026 Thomas A. Doan