The PANEL Procedure

Balanced Panels

Assume that the data are balanced (for example, all cross sections have T observations). Then you can write the following:

\[  \tilde{\mi {y}}_\mi {it} = \mi {y_\mi {it}} - \bar{\mi {y}}_\mi {i \cdot } - \bar{\mi {y}}_\mi {\cdot t} + \bar{\bar{\mi {y}}}  \]
\[  \tilde{\mi {\mb {x}}}_\mi {it} = \mi {\mb {x} _\mi {it}} - \bar{\mi {\mb {x}}}_\mi {i \cdot } - \bar{\mi {\mb {x}}}_\mi {\cdot t} + \bar{\bar{\mi {\mb {x}}}}  \]

where the symbols:

$\mi {y_\mi {it}} $ and $\mi {\mb {x} _\mi {it}} $ are the dependent variable (a scalar) and the explanatory variables (a vector whose columns are the explanatory variables not including a constant), respectively

$\bar{\mi {y}}_\mi {i \cdot } $ and $ \bar{\mi {\mb {x}}}_\mi {i \cdot }$ are cross section means

$\bar{\mi {y}}_\mi {\cdot t} $ and $ \bar{\mi {\mb {x}}}_\mi {\cdot t}$ are time means

$\bar{\bar{\mi {y}}} $ and $ \bar{\bar{\mi {\mb {x}}}}$ are the overall means

The two-way fixed-effects model is simply a regression of $\tilde{\mi {y}}_\mi {it} $ on $\tilde{\mi {\mb {x}}}_\mi {it} $. Therefore, the two-way ${\beta }$ is given by:

\[  \tilde{{\beta }}_{s}= \left(\tilde{\mi {\mb {X}}}^{}\tilde{\mi {\mb {X}}} \right)^{-1} \tilde{\mi {\mb {X}}}^{}\tilde{\mb {y}}  \]

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 $\gamma $ and the time effects by $\alpha $. These effects are calculated from the following relations:

\[  \hat{\gamma }_{i} = \left(\bar{\mi {y}}_\mi {i \cdot }- \bar{\bar{\mi {y}}} \right) - \tilde{{\beta }}_{s}\left( \bar{\mi {x}}_\mi {i \cdot }- \bar{\bar{\mi {x}}} \right)  \]
\[  \hat{\alpha }_{t} = \left(\bar{\mi {y}}_{\cdot \mi {t}}- \bar{\bar{\mi {y}}} \right) - \tilde{{\beta }}_{s}\left( \bar{\mi {x}}_{\cdot \mi {t}}- \bar{\bar{\mi {x}}} \right)  \]

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:

\[  D_ i^{C} = \hat{\gamma }_{i} + \hat{\alpha }_{T}  \]
\[  D_ t^{T} = \hat{\alpha }_{t}- \hat{\alpha }_{T}  \]

When an intercept is specified, the equations for dummy variables and intercept are:

\[  D_ i^{C} = \hat{\gamma }_{i}- \hat{\gamma }_{N}  \]
\[  D_ t^{T} = \hat{\alpha }_{t}- \hat{\alpha }_{T}  \]
\[  \mr {Intercept }= \hat{\gamma }_{N} + \hat{\alpha }_{T}  \]

The sum of squared errors is:

\[  \mr {SSE}= \sum _\mi {i = 1} ^\mi {N} \sum _\mi {t = 1} ^\mi {T_\mi {i}} (y_\mi {it} - \gamma _\mi {i}-\alpha _\mi {t} - \mb {X} _{s}\tilde{{\beta }}_{s})^{2}  \]

The estimated error variance is:

\[  \hat{{\sigma }}_{{\epsilon }}^{2}= \mr {SSE }/ (\mi {M}-\mi {N}-\mi {T}-(\mi {K} -1))  \]

With or without a constant, the variance covariance matrix of ${\tilde{\beta }}_{s}$ is given by:

\[  \mr {Var}\left[{\tilde{\beta }}_{s}\right] = \hat{{\sigma }}_{{\epsilon }}^{2}(\tilde{\mb {X} }^{}_{s} \tilde{\mb {X} }_{s})^{-1}  \]

Variance Covariance of Dummy Variables with No Intercept

The variances and covariances of the dummy variables are given with the NOINT specification as follows:

$\displaystyle  \mr {Var}\left(D_\emph {i} ^{C}\right)  $
$\displaystyle = $
$\displaystyle  \hat{\sigma }_{\epsilon }^{2} \left(\frac{1}{T} + \frac{1}{N} - \frac{1}{NT} \right)  $
$\displaystyle  $
$\displaystyle + $
$\displaystyle \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)  $
\[ \mr {Var}\left(D_\mi {t} ^{T}\right) = \frac{2\hat{\sigma }_{\epsilon }^{2}}{\mi {N}} +\left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right] \left( \bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right) \]
$\displaystyle  \mr {Cov}\left(D_\emph {i} ^{C},D_\emph {j} ^{C}\right)  $
$\displaystyle = $
$\displaystyle  \hat{\sigma }_{\epsilon }^{2} \left(\frac{1}{N} - \frac{1}{NT} \right)  $
$\displaystyle  $
$\displaystyle + $
$\displaystyle \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)  $
\[ \mr {Cov}\left(D_\mi {t} ^{T},D_\mi {u} ^{T}\right) = \frac{\hat{\sigma }_{\epsilon }^{2}}{N} + \left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - {\bar{\mi {\mb {x}}}}_{\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right] \left( \bar{\mi {\mb {x}}}_\mi {\cdot u} - \bar{\mi {\mb {x}}}_{\cdot T}\right) \]
\[ \mr {Cov}\left(D_\mi {i} ^{C},D_\mi {t} ^{T}\right) = -\frac{\hat{\sigma }_{\epsilon }^{2}}{N} +\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 {\cdot t} - \bar{\mi {\mb {x}}}_{\cdot T}\right) \]
\[ \mr {Cov}\left( D_\mi {i} ^ C,\beta \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] \]
\[ \mr {Cov}\left( D_\mi {i} ^ T,\beta \right) = -\left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right] \]

Variance Covariance of Dummy Variables with Intercept

The variances and covariances of the dummy variables are given when the intercept is included as follows:

$\displaystyle  \mr {Var}\left(D_\mi {i} ^{C}\right)  $
$\displaystyle = \frac{2\hat{\sigma }_{\epsilon }^{2}}{T} +\left(\bar{\mi {\mb {x}}}_\mi {i \cdot } - \bar{\mi {\mb {x}}}_\mi {N \cdot }\right)^{}\mr {Var}\left[{\tilde{\beta }}_{s}\right] \left(\bar{\mi {\mb {x}}}_\mi {i \cdot } - \bar{\mi {\mb {x}}}_\mi {N \cdot }\right) $
$\displaystyle \mr {Var}\left(D_\mi {t} ^{T}\right)  $
$\displaystyle = \frac{2\hat{\sigma }_{\epsilon }^{2}}{\mi {N}} +\left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right] \left( \bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right) $
$\displaystyle \mr {Var}\left(\mr {Intercept}\right)  $
$\displaystyle = \hat{\sigma }_{\epsilon }^{2} \left(\frac{1}{T} + \frac{1}{N} - \frac{1}{NT} \right) +\left(\bar{\mi {\mb {x}}}_\mi {N \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 {N \cdot } + \bar{\mi {\mb {x}}}_\mi {\cdot T} - \bar{\bar{\mi {\mb {x}}}}\right) $
$\displaystyle \mr {Cov}\left(D_\mi {i} ^{C},D_\mi {j} ^{C}\right)  $
$\displaystyle = \frac{\hat{\sigma }_{\epsilon }^{2}}{T} +\left(\bar{\mi {\mb {x}}}_\mi {i \cdot } - \bar{\mi {\mb {x}}}_\mi {N \cdot }\right)^{}\mr {Var}\left[{\tilde{\beta }}_{s}\right] \left(\bar{\mi {\mb {x}}}_\mi {j \cdot } - \bar{\mi {\mb {x}}}_\mi {N \cdot }\right) $
$\displaystyle \mr {Cov}\left(D_\mi {t} ^{T},D_\mi {u} ^{T}\right)  $
$\displaystyle = \left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right] \left( \bar{\mi {\mb {x}}}_\mi {\cdot u} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right) $
$\displaystyle \mr {Cov}\left(D_\mi {i} ^{C},\mr {Intercept}\right)  $
$\displaystyle =-\left(\frac{\hat{\sigma }_{\epsilon }^{2}}{T}\right) +\left(\bar{\mi {\mb {x}}}_\mi {i \cdot } - \bar{\mi {\mb {x}}}_\mi {N \cdot }\right)^{} \mr {Var}\left({\tilde{\beta }}_{s}\right) \left(\bar{\mi {\mb {x}}}_\mi {N \cdot } + \bar{\mi {\mb {x}}}_\mi {\cdot T} - \bar{\bar{\mi {\mb {x}}}}\right)  $
$\displaystyle \mr {Cov}\left(D_\mi {t} ^{T},\mr {Intercept}\right)  $
$\displaystyle =-\left(\frac{\hat{\sigma }_{\epsilon }^{2}}{N}\right) +\left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right] \left(\bar{\mi {\mb {x}}}_\mi {N \cdot } + \bar{\mi {\mb {x}}}_\mi {\cdot T} - \bar{\bar{\mi {\mb {x}}}}\right)  $
$\displaystyle \mr {Cov}\left(D_\mi {i} ^{C}, \tilde{\beta }\right)  $
$\displaystyle =-\left(\bar{\mi {\mb {x}}}_\mi {i \cdot } - \bar{\mi {\mb {x}}}_\mi {N \cdot }\right)^{}\mr {Var}\left[{\tilde{\beta }}_{s}\right]  $
$\displaystyle \mr {Cov}\left(D_\mi {t} ^{T}, \tilde{\beta }\right)  $
$\displaystyle =-\left(\bar{\mi {\mb {x}}}_\mi {\cdot t} - \bar{\mi {\mb {x}}}_\mi {\cdot T}\right)^{} \mr {Var}\left[{\tilde{\beta }}_{s}\right]  $
$\displaystyle \mr {Cov}\left(\mr {Intercept}, \tilde{\beta }\right)  $
$\displaystyle =-\left(\bar{\mi {\mb {x}}}_\mi {N \cdot } + \bar{\mi {\mb {x}}}_\mi {\cdot T} - \bar{\bar{\mi {\mb {x}}}}\right)^{}\mr {Var}\left[{\tilde{\beta }}_{s}\right]  $