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: AW: Id variable in xtreg fe


From   Estrella Gomez <estrellastata@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <martin.weiss1@gmx.de>:
>
> <>
> Try NJC and coauthor`s FAQ at
> http://www.stata.com/support/faqs/data/repeatedtime.html
>
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Estrella Gomez
> Gesendet: Montag, 28. Juni 2010 11:49
> An: statalist@hsphsun2.harvard.edu
> 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index