In the third version of the fixed effects approach, known as the least squares dummy variable (LSDV) method, the unobserved effect is brought explicitly into the model.
If we define a set of dummy variables Ai, where Ai is equal to 1 in the case of an observation relating to individual i and 0 otherwise, the model can be rewritten as shown.
Formally, the unobserved effect is now being treated as the coefficient of the individual specific
dummy variable, the
iAi term representing a fixed effect on the dependent variable Yi for individual i (this accounts for the name given to the fixed effects approach).
Having re-specified the model in this way, it can be fitted using OLS.
Note that if we include a dummy variable for every individual in the sample as well as an intercept, we will fall into the dummy variable trap.
To avoid this, we can define one individual to be the reference category, so that 1 is its intercept, and then treat the i as the shifts in the intercept for the other individuals.
However, the choice of reference category is often arbitrary and accordingly the interpretation of the i not particularly illuminating.
Alternatively, we can drop the 1 intercept and define dummy variables for all of the individuals, as has been done here. The i now become the intercepts for each of the individuals.
Note that, in common with the first two versions of the fixed effects approach, the LSDV method requires panel data.
With cross-sectional data, one would be defining a dummy variable for every observation, exhausting the degrees of freedom. The dummy variables on their own would give a perfect but meaningless fit.
If there are a large number of individuals, using the LSDV method directly is not a practical proposition, given the need for a large number of dummy variables.
However, it can be shown mathematically that the approach is equivalent to the withingroups method and therefore yields precisely the same estimates.
Thus in practice we always use the within-groups method rather than the LSDV method. But it may be useful to know that the within-groups method is equivalent to modelling the fixed effects with dummy variables.
The only apparent difference between the LSDV and within-groups methods is in the number of degrees of freedom. It is easy to see from the LSDV specification that there are nT – k – n degrees of freedom if the panel is balanced.
In the within-groups approach, it seemed at first that there were nT – k. However n degrees of freedom are consumed in the manipulation that eliminate the i, so the number of degrees of freedom is really nT – k – n.