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: AW: Id variable in xtreg fe
From
Estrella Gomez <[email protected]>
To
[email protected]
Subject
Re: st: AW: Id variable in xtreg fe
Date
Mon, 28 Jun 2010 12:02:44 +0200
Thank you for your answer. I have seen the FAQ, but it does not work
in my case. The main problem is that I do not know if I should enter
"countrypair" or "i" as id in my regression
Thanks anyway
Estrella
2010/6/28 Martin Weiss <[email protected]>:
>
> <>
> Try NJC and coauthor`s FAQ at
> http://www.stata.com/support/faqs/data/repeatedtime.html
>
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Estrella Gomez
> Gesendet: Montag, 28. Juni 2010 11:49
> An: [email protected]
> Betreff: st: Id variable in xtreg fe
>
> Hi
>
> I am trying to estimate a fixed effects model with the comand xtreg,
> fe. My datasets contains exports from 80 countries to another 80
> countries. "i" is the exporter country and "j" is the importer. I have
> created the variable "countrypair" as:
>
> egen countrypair = group(ichlnum jchlnum)
>
> The dependent variable is lxi (logarithm of exports from i to j). I
> want to estimate two different models, one controlling for individual
> country specific effects and another controlling for country pair
> specific effects. I do not have problems with the second, but in the
> first case I don't know if I should type this:
>
> xtset countrypair t
> xtreg lxi lGDP_i lGDP_j contig comla smctry ldist i.i i.j i.t, robust
> (I do not know if this is correctly specified, because the id is not
> the country but the pair of countries)
>
> or this:
>
> xtset i t
> xtreg lxi lGDP_i lGDP_j contig comla smctry ldist i.i i.j i.t, robust
>
> However, in this case I obtain the error message "repeated time values
> within panel", so I have repeated it with "xtset i" instead of "xtset
> i t" (is this correct?)
>
> The coefficients that I have obtained in both cases are different.
> Does anybody know which is the correct specification for this type of
> model?
>
> Thanks in advance
> Estrella
> *
> * 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/
>
>
> *
> * 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/
>
*
* 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/