[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: SUR and unbalanced panel data

From   Conny Chen <>
Subject   Re: st: SUR and unbalanced panel data
Date   Fri, 19 Oct 2007 22:42:19 -0400

Hi Kit,
Thanks again for your response. I've run into a bit of trouble with the scaling part. I have two groups, with 48 and 19 observations respectively, and both have 18 independent variables. Perhaps I'm not understanding this correctly, but when I stack the X matrices, I end up with a 67x36 ((48+19)*(18+18)) matrix.I'm not sure how to scale this with the covariance matrix. Do I calculate the feasible GLS estimator as

I keep running into conformability errors since (omega^-1) ends up being a 96x96 matrix.
Is there another way to calculate this? Thanks so much for your help.


statalist-digest wrote:


Date: Thu, 18 Oct 2007 06:59:55 -0400
From: Kit Baum <>
Subject: st: Re: SUR and unbalanced panel data

A SUR on unbalanced panels can be done, but not in Stata without some programming. -sureg- does not have an option to handle that case. Essentially you just need to run the individual OLS regressions that are done in the first stage of SUR, save their residuals, and compute the matrix of _pairwise_ correlations rather than the standard correlation matrix that is generated by -sureg- as e(Sigma). It would then take some programming (most easily done in Mata) to assemble the appropriate X matrices and y vectors and compute the SUR estimator. Each of the GLS terms can be written as the sum of the diagonal chunks of the stacked X matrix, crossed with either the same X or with the appropriate piece of y, scaled by the appropriate pairwise correlation (more properly, covariance from your new e(Sigma) matrix). The textbook SUR treatment considers that each X matrix has T rows but perhaps a different number of columns; this just says that each X matrix may have T_g rows, where that value differs across equations. Relative to the -sureg- implementation, allowing for unbalanced panels is just a matter of housekeeping.

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

On Oct 18, 2007, at 2:33 AM, statalist-digest wrote:

Hi there. I am trying to run a SUR and have an unbalanced panel data
set. I've been referring to Baum's Introduction to Modern Econometrics
and it states that the model could be fitted with an unbalanced panel.
I've tried using the SUREG command, but it defaults to using the least
number of observations on all of the groups. I'd like to be able to
exploit the extra observations I have for one of the groups. Does anyone
know how to do this?
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index