Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: xtset and xtreg for panel data
From
Jeph Herrin <[email protected]>
To
[email protected]
Subject
Re: st: xtset and xtreg for panel data
Date
Sun, 27 Nov 2011 20:21:10 -0500
Sounds like you want to use -xtmixed- so you can model the variance appropriately.
Something like
xtmixed depvar indvars || country: || station:
would account for multiple obs at both station and country level.
hope this helps,
Jeph
On 11/27/2011 3:08 PM, Andrew Wong Yoon Loong wrote:
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/
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1873 / Virus Database: 2101/4642 - Release Date: 11/27/11
*
* 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/