[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Different numbers of observations in sureg
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
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
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: