| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: A question about fixed-effect regression
Hi, All,
Here is a question about the fixed-effect regression. The following is a
dataset:
id y x1 x2
--------------------------
1 4 1 2
1 13 0 6
1 2 0 5
--------------------------
2 5 0 7
2 7 0 9
--------------------------
3 9 1 5
3 10 1 3
3 12 0 1
--------------------------
4 12 1 4
4 15 1 7
--------------------------
I want to estimate the effect of x1 on y (controlling for x2) using fixed
effect regression. The command is
.iis id
.xtreg y x1 x2, fe
which generates the results:
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
x1 | -2.857401 3.369186 -0.85 0.444 -12.21176
6.496959
x2 | .5703971 .8082814 0.71 0.519 -1.673752
2.814546
_cons | 7.533755 4.564256 1.65 0.174 -5.138651
20.20616
-------------+----------------------------------------------------------------
But notice that for id=2 and id=4, x1 does not vary within the same id. If
the fixed effect realy make use of the
variation within the same id, may be I should exclude these observations.
The command is:
.xtreg y x1 x2 if id~=2 & id~=4, fe
which generates the results:
------------------------------------------------------------------------------
y | Coef. Std. Err. t P>|t| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
x1 | -2.899497 4.701649 -0.62 0.600 -23.12906
17.33006
x2 | .4020101 1.329827 0.30 0.791 -5.319774
6.123794
_cons | 8.309045 5.984222 1.39 0.299 -17.43898
34.05707
-------------+----------------------------------------------------------------
The coefficient on x1 in these two regressions are closed but not exactly
the same, so are their standard errors.
My question is: which one make more sense?
Thank you.
Jackie
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
*
* 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/