
Assume that the data are balanced (for example, all cross sections have T observations). Then you can write the following:
where the symbols:
and
are the dependent variable (a scalar) and the explanatory variables (a vector whose columns are the explanatory variables
not including a constant), respectively
and
are cross section means
and
are time means
and
are the overall means
The two-way fixed-effects model is simply a regression of
on
. Therefore, the two-way
is given by:
The calculations of cross section dummy variables, time dummy variables, and intercepts follow in a fashion similar to that used in the one-way model.
First, you obtain the net cross-sectional and time effects. Denote the cross-sectional effects by
and the time effects by
. These effects are calculated from the following relations:
Denote the cross-sectional dummy variables and time dummy variables with the superscript C and T. Under the NOINT option the following equations give the dummy variables:
When an intercept is specified, the equations for dummy variables and intercept are:
The sum of squared errors is:
The estimated error variance is:
With or without a constant, the variance covariance matrix of
is given by:
The variances and covariances of the dummy variables are given with the NOINT specification as follows:
![\begin{eqnarray*} \mr{Var}\left(D_\emph {i} ^{C}\right) & =& \hat{\sigma }_{\epsilon }^{2} \left(\frac{1}{T} + \frac{1}{N} - \frac{1}{NT} \right) \\ & +& \left(\bar{\mi{\mb{x}}}_{\mi{i} \cdot } + \bar{\mi{\mb{x}}}_\mi {\cdot T} - \bar{\bar{\mi{\mb{x}}}}\right)^{'}\mr{Var}\left[{\tilde{\beta }}_{s}\right] \left(\bar{\mi{\mb{x}}}_\mi {i \cdot } + \bar{\mi{\mb{x}}}_\mi {\cdot T} - \bar{\bar{\mi{\mb{x}}}}\right) \end{eqnarray*}](images/etsug_panel0121.png)
![\begin{eqnarray*} \mr{Cov}\left(D_\emph {i} ^{C},D_\emph {j} ^{C}\right) & =& \hat{\sigma }_{\epsilon }^{2} \left(\frac{1}{N} - \frac{1}{NT} \right) \\ & +& \left(\bar{\mi{\mb{x}}}_\mi {i \cdot } + \bar{\mi{\mb{x}}}_\mi {\cdot t} - \bar{\bar{\mi{\mb{x}}}}\right)^{'}\mr{Var}\left[{\tilde{\beta }}_{s}\right] \left(\bar{\mi{\mb{x}}}_\mi {j \cdot } + \bar{\mi{\mb{x}}}_\mi {\cdot t} - \bar{\bar{\mi{\mb{x}}}}\right) \end{eqnarray*}](images/etsug_panel0123.png)