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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: xtset and xtreg for panel data


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xtset and xtreg for panel data
Date   Mon, 28 Nov 2011 00:17:21 +0000

You don't state what you regard as a panel, but manifestly -xtset
country year- won't work because you have different stations within
countries. If panels are stations in countries you can proceed, but
seemingly not otherwise except with a different kind of analysis.

You write as if your problem is technical, meaning that we should be
able to tell you what the solutions are, but your main problem appears
rather to be conceptual, and we can't tell you what your ideas are
about the data generation process.

Nick

On Sun, Nov 27, 2011 at 8:08 PM, Andrew Wong Yoon Loong
<wongylo@gmail.com> wrote:

> 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.

*
*   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