 
               
 
               Let  and
 and  be the independent and dependent variables arranged by time and by cross section within each time period. (Note that the
               input data set used by the PANEL procedure must be sorted by cross section and then by time within each cross section.) Let
 be the independent and dependent variables arranged by time and by cross section within each time period. (Note that the
               input data set used by the PANEL procedure must be sorted by cross section and then by time within each cross section.) Let
                be the number of cross sections observed in year
 be the number of cross sections observed in year  and let
 and let  . Let
. Let  be the
 be the  matrix obtained from the
 matrix obtained from the  identity matrix from which rows that correspond to cross sections not observed at time
 identity matrix from which rows that correspond to cross sections not observed at time  have been omitted. Consider
 have been omitted. Consider 
            
![\[  \mb{Z} =(\mb{Z} _{1}, \mb{Z} _{2})  \]](images/etsug_panel0137.png)
 where  and
and  . The matrix
. The matrix  gives the dummy variable structure for the two-way model.
 gives the dummy variable structure for the two-way model. 
            
Let

The estimate of the regression slope coefficients is given by
![\[  \tilde{{\beta }}_{s}= ( \mb{X} ^{'}_{{\ast } s}\mb{PX} _{{\ast }s})^{-1} \mb{X} ^{'}_{{\ast } s}\mb{Py} _{{\ast }}  \]](images/etsug_panel0142.png)
 where  is the
 is the  matrix without the vector of 1s.
 matrix without the vector of 1s. 
            
The estimator of the error variance is
![\[  \hat{{\sigma }}^{2}_{{\epsilon }}= \tilde{\mb{u} }^{'}\mb{P} \tilde{\mb{u} } / (\mi{M}-\mi{T}-\mi{N} +1-(\mi{K} -1))  \]](images/etsug_panel0145.png)
 where the residuals are given by  if there is an intercept in the model and by
 if there is an intercept in the model and by  if there is no intercept.
 if there is no intercept. 
            
The actual implementation is quite different from the theory. The PANEL procedure transforms all series using the  matrix.
 matrix. 
            
![\[  \mb{\bar{v}}=\mb{P}\mb{v}  \]](images/etsug_panel0149.png)
 The variable being transformed is  , which could be
, which could be  or any column of
 or any column of  . After the data are properly transformed, OLS is run on the resulting series.
. After the data are properly transformed, OLS is run on the resulting series. 
            
Given  , the next step is estimating the cross-sectional and time effects. Given that
, the next step is estimating the cross-sectional and time effects. Given that  is the column vector of cross-sectional effects and
 is the column vector of cross-sectional effects and  is the column vector of time effects,
 is the column vector of time effects, 
            
![\[  \tilde{{\balpha }} = \mb{Q} ^{-1}\bar{\mb{Z}} ^{'}\mi{y} - \mb{Q} ^{-1}\bar{\mb{Z}}^{'}\mb{X} _\mi {s} \tilde{\beta }_{s}  \]](images/etsug_panel0156.png)
![\[  \tilde{{\bgamma }} = (\Theta _{1} + \Theta _{2}- \Theta _{3})\mi{y} -(\Theta _{1} + \Theta _{2}- \Theta _{3})\mb{X} _\mi {s} \tilde{\beta }_{s}  \]](images/etsug_panel0157.png)
![\[  \Theta _{1} = \Delta _{N}^{-1}\mb{Z} ^{'}_{1}  \]](images/etsug_panel0158.png)
![\[  \Theta _{2} = \Delta _{N}^{-1}\mb{A} ^{'}Q^{-1}\mb{Z} _{2}^{'}  \]](images/etsug_panel0159.png)
![\[  \Theta _{3} = \Delta _{N}^{-1}\mb{A} ^{'}Q^{-1}\mb{A} \Delta _{N}^{-1}\mb{Z} _{1}^{'}  \]](images/etsug_panel0160.png)
Given the cross-sectional and time effects, the next step is to derive the associated dummy variables. Using the NOINT option, the following equations give the dummy variables:
![\[  D_ i^{C} = \hat{\gamma }_{i} + \hat{\alpha }_{T}  \]](images/etsug_panel0115.png)
![\[  D_ t^{T} = \hat{\alpha }_{t}- \hat{\alpha }_{T}  \]](images/etsug_panel0116.png)
When an intercept is desired, the equations for dummy variables and intercept are:
![\[  D_ i^{C} = \hat{\gamma }_{i}- \hat{\gamma }_{N}  \]](images/etsug_panel0117.png)
![\[  D_ t^{T} = \hat{\alpha }_{t}- \hat{\alpha }_{T}  \]](images/etsug_panel0116.png)
![\[  \mr{Intercept }= \hat{\gamma }_{N} + \hat{\alpha }_{T}  \]](images/etsug_panel0118.png)
The calculation of the covariance matrix is as follows:
![\begin{eqnarray*}  \mr{Var}\left[\hat{\bgamma } \right] & =& \hat{\sigma }_{\epsilon }^{2}\left( \Delta _\emph {N} ^{-1}- {\Sigma }_{1} + {\Sigma }_{2} \right) \\ & +& (\Theta _{1} + \Theta _{2}- \Theta _{3}) \mr{Var}\left[{\tilde{\beta }}_{s}\right] (\Theta _{1} + \Theta _{2}- \Theta _{3})^{'} \end{eqnarray*}](images/etsug_panel0161.png)
where
![\[  \Sigma _{1} = \Delta _{N}^{-1}\mb{A} ^{'}\mb{Q} ^{-1}\mb{A} \Delta _{N}^{-1}\mb{A} ^{'}\mb{Q} ^{-1}\mb{A} \Delta _{N}^{-1}  \]](images/etsug_panel0162.png)
![\[  \Sigma _{2} = \Delta _{N}^{-1}\mb{A} ^{'}\mb{Q} ^{-1}\Delta _{T}\mb{Q} ^{-1}\mb{A} \Delta _{N}  \]](images/etsug_panel0163.png)
![\[  \mr{Var}\left[\hat{{\balpha }} \right] = \hat{\sigma }_{\epsilon }^{2}\left(\mb{Q} ^{-1}\bar{\mb{Z}} ^{'}\bar{\mb{Z}} \mb{Q} ^{-1}\right) + \left(\mb{Q} ^{-1}\bar{\mb{Z}} ^{'}\mb{X} _\mi {s} \right)\mr{Var}\left[{\tilde{\beta }}_{s}\right] \left(\mb{X} _\mi {s} ^{'}\bar{\mb{Z}} \mb{Q} ^{-1}\right) \]](images/etsug_panel0164.png)
![\begin{eqnarray*}  \mr{Cov}\left[\hat{\balpha }, \hat{\bgamma }^{'}\right] & =&  \hat{\sigma }_{\epsilon }^{2}{\Delta }_{N}^{-1} \left[\Strong{A} ^{'}\Strong{Q} ^{-1}{\Delta }_{T}- \Strong{A} ^{'}\Strong{Q} ^{-1}\Strong{A} {\Delta }_{N}^{-1}\Strong{A} ^{'}\right]\Strong{Q} ^{-1} \\ & +& (\Theta _{1} + \Theta _{2}- \Theta _{3}) \mr{Var}\left[{\tilde{\beta }}_{s}\right] \left(\Strong{X} _\mi {s} ^{'}\bar{\mb{Z}} \mb{Q} ^{-1}\right) \end{eqnarray*}](images/etsug_panel0165.png)
![\[  \mr{Cov}\left[\hat{\bgamma },\tilde{\beta } \right] = (\Theta _{1} + \Theta _{2}- \Theta _{3}) \mr{Var}\left[{\tilde{\beta }}_{s}\right]  \]](images/etsug_panel0166.png)
![\[  \mr{Cov}\left[\hat{\balpha },\tilde{\beta } \right] = \left(\mb{Q} ^{-1}\bar{\mb{Z}} ^{'}\mb{X} _\mi {s} \right)\mr{Var}\left[{\tilde{\beta }}_{s}\right]  \]](images/etsug_panel0167.png)
Now you work out the variance covariance estimates for the dummy variables.
The variances and covariances of the dummy variables are given under the NOINT selection as follows:
