----- Original Message -----
From: "RonDorsey" <[email protected]>
> Dear Statalist(ers)
>
> Can you put me right on something re: fixed effects on panel data?
>
> I've always thought (probably wrongly) that running fixed effects (xtreg,
> fe) is the same as running OLS (including group dummies) on the same
model.
>
> If I run both separately, I do get the same results except that:
>
> 1.  dummy coefficients from OLS are not the same as the fixed effects ui
> from xtpred
This is because you have to add in the constant from the xtreg, fe to the
predicted ui values to get the individual fixed effects.
Example:
. use "C:\Stata\auto.dta", clear
(1978 Automobile Data)
. qui tab for, gen(dummy)
. reg mpg price dummy1 dummy2, nocon nohead
----------------------------------------------------------------------------
--
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
       price |   -.000959   .0001815    -5.28
.000     -.001321    -.000597
      dummy1 |   25.65058   1.271581    20.17   0.000     23.11512
28.18605
      dummy2 |   30.89586   1.514173    20.40   0.000     27.87668
33.91503
----------------------------------------------------------------------------
--
. qui xtreg mpg price, i(foreign) fe
. predict con , u
. replace con = con+_b[_cons]
(74 real changes made)
. tab con
 u[foreign] |      Freq.     Percent        Cum.
------------+-----------------------------------
   25.65059 |         52       70.27       70.27
   30.89585 |         22       29.73      100.00
------------+-----------------------------------
      Total |         74      100.00
You might want to take a look at the Stata FAQ "How can there be an
intercept in the fixed-effects model estimated by xtreg, fe?"
(http://www.stata.com/support/faqs/stat/xtreg2.html)
Since you mentioned xtpred, are you using Stata version 5?
Scott
*
*   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/