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]
Re: st: constant in -xtreg (yes, again!)
From
Scott Merryman <[email protected]>
To
[email protected]
Subject
Re: st: constant in -xtreg (yes, again!)
Date
Wed, 4 Dec 2013 12:29:08 -0600
Yes.
Here is an attempt:
Regression with dummies:
y_it = a_i + x_it*b + e
a_i = y_it - x_it*b + e
Calculate the average
Sum_t Sum_i a_i/(T_i*n) = Sum_t Sum_i y_it/(T_i*n) - Sum_t Sum_i
x_it/(T_i*n) + Sum_t Sum_i e/(T_i*n)
T_i* a_i/(T_i*n) = y2bar - x2bar
xtreg,fe:
(y_it - ybar_i - y2bar) = a + (x_it - xbar_i + x2bar)*b + e
a = (y_it - ybar_i - y2bar)- (x_it - xbar_i + x2bar)*b - e
Sum_t Sum_i a = Sum_t Sum_i [(y_it - ybar_i - y2bar)- (x_it - xbar_i +
x2bar)*b - e]
Since
Sum_t Sum_i y_it = y2bar
Sum_t Sum_i ybar_i = y2bar
Simplifies
a*T*n = y2bar*T*n - x2bar*T*n
a = y2bar - x2bar = Sum_t Sum_i a_i/(T_i*n)
On Wed, Dec 4, 2013 at 1:07 AM, jean-luc morin-chesnel
<[email protected]> wrote:
> Oh Scott thank you very much!
> Of course, it is the weighted average! ;-)
>
> So I am right to say that the proof that the constant is equal to the
> average fixed effects is not shown in the faq?!
>
> Many thanks again
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/