Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: xtset and xtreg for panel data


From   Andrew Wong Yoon Loong <wongylo@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: xtset and xtreg for panel data
Date   Sun, 27 Nov 2011 15:08:43 -0500

Hi Statalisters,

I am working with panel data that is similar to the following:

Station   Country        Year    Var1   Var2
1              US            1990    25      25
1              US            1991    15      18
2              US            1990    60      12
2              US            1991    300     50
3              BR            1990    25      25
3              BR            1991    300     50
4              BR            1990    25      25
4              BR            1991    300     50

I'm trying to use the xtreg command to perform both fe and re models.
However, I can't perform the initial xtset country year because of
duplicates. Is there a way around this problem? I know one option is
simply to employ LSDV and create a dummy for each country but I'm
hoping to still be able to use xtreg. Thanks in advance for your help.

Regards,
Andrew

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index