Bookmark and Share

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]

st: Id variable in xtreg fe


From   Estrella Gomez <[email protected]>
To   [email protected]
Subject   st: Id variable in xtreg fe
Date   Mon, 28 Jun 2010 11:49:01 +0200

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index