The HPPANEL Procedure

Two-Way Random-Effects Model

The specification for the two-way random-effects model is

\[ u_{it}={\nu }_{i}+e_{t} + {\epsilon }_{it} \]

As it does for the one-way random-effects model, the HPPANEL procedure provides four options for variance component estimators. However, unbalanced panels present some special concerns that do not occur for one-way random-effects models.

Let ${\mb{X} _{*}}$ and ${\mb{y} _{{\ast }}}$ be the independent and dependent variables that are arranged by time and by cross section within each time period. (Note that the input data set that the PANEL procedure uses must be sorted by cross section and then by time within each cross section.) Let ${\mi{M} _{t}}$ be the number of cross sections that are observed in time ${t}$, and let ${\sum _{t}\mi{M} _{t}=\mi{M} }$. Let ${\mb{D} _{t}}$ be the ${\mi{M} _{t}{\times } \mi{N} }$ matrix that is obtained from the ${\mi{N} {\times } \mi{N} }$ identity matrix from which rows that correspond to cross sections that are not observed at time ${t}$ have been omitted. Consider

\[ \mb{Z} =(\mb{Z} _{1}, \mb{Z} _{2}) \]

where ${\mb{Z} _{1}=( \mb{D} ^{'}_{1}, \mb{D} ^{'}_{2},\ldots .. \mb{D} ^{'}_{T})^{'} }$and ${\mb{Z} _{2}=\mr{diag}(\mb{D} _{1}\mb{j} _{N},\mb{D} _{2}\mb{j} _{N},\ldots \ldots \mb{D} _{T}\mb{j} _{N})}$.

The matrix $\mb{Z} $ contains the dummy variable structure for the two-way model.

For notational ease, let

\[ {\Delta }_{N}= \mb{Z} ^{'}_{1} \mb{Z} _{1} \]
\[ {\Delta }_{T}= \mb{Z} ^{'}_{2}\mb{Z} _{2} \]
\[ \mb{A} = \mb{Z} ^{'}_{2}\mb{Z} _{1} \]
\[ \bar{\mb{Z}}=\mb{Z} _{2}-\mb{Z} _{1} {\Delta }^{-1}_{N}\mb{A} ^{'} \]
\[ \bar{\Delta }_{1}=\mb{I} _{M}-\mb{Z} _{1} {\Delta }^{-1}_{N}\mb{Z} ^{'}_{1} \]
\[ \bar{\Delta }_{2}=\mb{I} _{M}-\mb{Z} _{2} {\Delta }^{-1}_{T}\mb{Z} ^{'}_{2} \]
\[ \mb{Q} ={\Delta }_{T}-\mb{A} {\Delta }^{-1}_{N}\mb{A} ^{'} \]
\[ \mb{P} =(\mb{I} _{M}- \mb{Z} _{1} {\Delta }^{-1}_{N}\mb{Z} ^{'}_{1}) - \bar{\mb{Z}}\mb{Q}^{-1}\bar{\mb{Z}}^{'} \]

PROC HPPANEL provides four methods to estimate the variance components. For more information, see the section Two-Way Random-Effects Model.

After the estimates of the variance components are calculated, you can proceed to the final estimation. If the panel is balanced, partial mean deviations are used as follows

\[ \tilde{y}_\mi {it} = y_\mi {it}- \theta _{1} \bar{y}_\mi {i \cdot } - \theta _{2} \bar{y}_\mi {\cdot t} + \theta _{3} \bar{y}_\mi {\cdot \cdot } \]
\[ \tilde{x}_\mi {it} = x_\mi {it}- \theta _{1} \bar{x}_\mi {i \cdot } - \theta _{2} \bar{x}_\mi {\cdot t} + \theta _{3} \bar{x}_\mi {\cdot \cdot } \]

The $\theta $ estimates are obtained from

\[ \theta _{1} = 1 - \frac{\sigma _{\epsilon }}{\sqrt {T\sigma _{\nu }^{2} + \sigma _{\epsilon }^{2}}} \]
\[ \theta _{2} = 1 - \frac{\sigma _{\epsilon }}{\sqrt {N\sigma _{e}^{2} + \sigma _{\epsilon }^{2}}} \]
\[ \theta _{3} = \theta _{1} + \theta _{2} + \frac{\sigma _{\epsilon }}{\sqrt {T\sigma _{\nu }^{2} + N\sigma _{e}^{2} + \sigma _{\epsilon }^{2}}}- 1 \]

With these partial deviations, PROC HPPANEL uses OLS on the transformed series (including an intercept if you want).

The case of an unbalanced panel is somewhat more complicated. Wansbeek and Kapteyn show that the inverse of $\Omega $ can be written as

\[ \sigma _{\epsilon }^{2}\Omega ^{-1} = \mb{V}- \mb{V}\mb{Z}_2\tilde{\mb{P}}^{-1}\mb{Z}_2^{'}\mb{V} \]

with the following:

\begin{eqnarray*} \Strong{V} & =& \Strong{I}_ M - \Strong{Z}_1\tilde{\Delta }_{N}^{-1}\Strong{Z}_1’ \\ \tilde{\Strong{P}} & =& \tilde{\Delta }_{T}- \Strong{A}\tilde{\Delta }_{N}^{-1}\Strong{A}^{'} \\ \tilde{\Delta }_{N} & =& \Delta _{N} + \left(\frac{\sigma _{\epsilon }^{2}}{\sigma _{\nu }^{2}}\right)\Strong{I}_{N} \\ \tilde{\Delta }_{T} & =& \Delta _{T} + \left(\frac{\sigma _{\epsilon }^{2}}{\sigma _{e}^{2}}\right)\Strong{I}_{T} \end{eqnarray*}

By using the inverse of the covariance matrix of the error, it becomes possible to complete GLS on the unbalanced panel.