robert --
in a fixed effects regression, if x is uncorrelated with the grouping
variable (if mean(x) is the same across groups), the OLS and the fixed
effects estimator will give the same coefficient estimate (but different
standard errors).
so if your x variable does not vary across years (mean(x) is constant
over time), then -reg- and -xtreg- will give the same estimates. so
from your results i would guess that your x-variable varies across
countries, but not across years -- hence your year fixed effects will
not be much different than your OLS estimates, but your country fixed
effects estimates will be.
note: a constant value of mean(x) across groups is sufficient, but not
necessary for OLS and the fixed effects estimator to give the same
coefficient estimates:
to see this, let i index observations, let j be a grouping variable, and
Xj_bar be the mean of X in group j)
fiting the following model using OLS yields the same point estimate for
the coefficient of X as the fixed effects estimator
Yij = b0 + b1(Xj_bar) + b2(Xij - Xj_bar)
= b0 + (b1 - b2)(Xj_bar) + b2(Xij)
note that if Xj_bar is the same for all j, then the (b1 - b2)(Xj_bar)
term will be absorbed in the intercept and this will be the same as
fitting
Yij = b0 + b2(Xij)
using OLS. likewise, if b1=b2, then the (b1 - b2)(Xj_bar) term will
drop out and this will be the same as fitting
Yij = b0 + b2(Xij)
using OLS.
so OLS will give the same estimates as the fixed effects estimator if
either a) Xj_bar is constant across groups or b) the between-group slope
is the same as the within-group slope (i.e., b1=b2).
sean.
_____________________________
sean f. reardon
associate professor of education and (by courtesy) sociology
school of education
485 lasuen mall, #315
stanford university
stanford, ca 94305-3096
650.736.8517 (office phone)
650.725.7412 (office fax)
[email protected]
_____________________________
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Gustavo
Sanchez
Sent: Wednesday, March 02, 2005 10:34 AM
To: [email protected]
Subject: st: RE: OLS, FE xtreg and the i() option
Robert [[email protected]] asked:
>I have been working on a panel dataset, looking at the relationship
>between inflation and openness, but am slightly confused at to the
>results I have been finding. When running OLS and Fixed-Effects (FE)
>estimations completely different results are found. However, when the
>i() option for the FE estimation is set to the year (which it
>shouldn't be; it should be the country code), the panel data results
>are almost exactly equal to OLS.
>Am I making an error in my use of Stata, or is this a kind of
>'pooling' (when setting i() to the year), implying that the 'correct'
>value is as found by the 'correct' FE estimation. I have not been
>able to find any direct information on this in the Stata documentation
>or the net in general - any comments that you can give will be much
>appreciated.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/