Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: xtreg v areg


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: xtreg v areg
Date   Thu, 17 Jun 2004 07:14:40 -0400

On Jun 15, 2004, at 2:33 AM, Clive wrote:

However, I noticed something in my two 'identical' models:

. areg edconch edround2 edround3 edtime edtimesq edyear edpollch lagconch
laglabch lagldmch clmargin ldmargin conplace edenp class if edmarker==1,
absorb(pano)

Number of obs = 1632
F( 14, 1314) = 69.42
Prob > F = 0.0000
R-squared = 0.7324
Adj R-squared = 0.6678
Root MSE = 6.1165

[...]

. tsset pano edyear

. xtreg edconch edround2 edround3 edtime edtimesq edyear edpollch lagconch
laglabch lagldmch clmargin ldmargin conplace edenp class if edmarker==1,
fe

Fixed-effects (within) regression Number of obs = 1632
Group variable (i): pano Number of groups = 304

R-sq: within = 0.4252 Obs per group: min = 1
between = 0.4157 avg = 5.4
overall = 0.3644 max = 10

F(14,1314) = 69.42
corr(u_i, Xb) = -0.5123 Prob > F = 0.0000

[...]

Now, I have fit the same models here (with the same FE in both) whilst
'switching off' any weighting and cluster options in both of them. How is
it that the R^2 is not the same in both models? Doubtless I'm overlooking
something. Ta.

Without looking carefully at the formulas used in xtreg, fe, I think conceptually the issue is that xtreg, fe considers the explanation of \sum {{y_{it} - \bar{y}_i)^2} : that is, after demeaning the data by the individual means, how much of the remaining variation is explained by your regressors? In areg, I suspect that in absorbing the factor pano, the amount of variation absorbed is also included in r^2, just as it would be if you included the dummies explicitly. That is, a one-way ANOVA of your depvar on pano would explain some amount of the variation. Do an ANOCOVA including pano and a bunch of regressors, and you explain more. But the xtreg, fe model considers that the only thing to be explained is y net of individual mean y.

Kit

*
* 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/




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