Statalist The Stata Listserver


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

Re: st: Different numbers of observations in sureg


From   "Brian P. Poi" <bpoi@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Different numbers of observations in sureg
Date   Mon, 14 May 2007 10:02:47 -0500 (CDT)

On Mon, 14 May 2007 09:16:36 -0400 Alemu Mekonnen wrote:

I would like to use different number of observations in the different equations when using the seemingly unrelated regression command in stata (i.e., sureg). For example, if there are two equations, I wanted to use 600 observations for equation 1 and 900 observations for equation 2. My question is how do I limit the number of observations to do this. I was not able to use the IF command but this applies to all the equations in the system.
Alemu,

Allen McDowell illustrates a clever way of fitting the SUR model with unequal numbers of observations by using the -xtgee- command in a "From the help desk" article in the Stata Journal (vol. 4, no. 4).

The trick is to recognize that the SUR model

y1 = x1 * b1 + u1
y2 = x2 * b2 + u2

can be "stacked" and written as

[ y1 ] = [ x1 0 ][ b1 ] + [ u1 ]
[ y2 ] [ 0 x2 ][ b2 ] + [ u2 ]

The stacked version looks just like a panel data model with two panels. One thing to note is in a SUR model, u1 and u2 are allowed to have different variances, while -xtgee- assumes they have a common variance. McDowell's article shows how to rescale the data using OLS regression and how to manipulate your dataset to use with -xtgee-. Then to fit the model you simply use -xgee- with a Gaussian distribution, identity link function, and an unstructured correlation matrix.

-- Brian Poi
-- bpoi@stata.com


Reference
------------
McDowell, A.W. (2004). From the help desk: Seemingly unrelated regression
with unbalanced equations. Stata Journal, 4(4): 442-448.


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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