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

Re: st: panel within transformation cause serial correlation?


From   "Enrico Pellizzoni" <[email protected]>
To   [email protected]
Subject   Re: st: panel within transformation cause serial correlation?
Date   Tue, 16 Dec 2003 09:32:01 +0100


Probably now I got your point.

Let's write your model as      y_(it)=D*a_i+B*X+e_(it)    (1)

where D is simply the matrix of dummy variables

It is true that:
   the OLS estimation of this model    (in Stata   reg  y  x  a_1  a_2 ...)
   the within estimation of the model     (in Stata   xtreg  y  x )

give exactly the same result.

The fact is that the Within estimation in Stata doesn't perform you trasformation (2), but simply uses a partitioned OLS
estimation of (1).
The estimator for B, in a simple partitioned regression, is:

B=(X*Md*X')-1 * Md*X*y     where  Md= I-D*(D'*D)-1*D'.  Md has the property that:  Md*Md'=Md

This is exaclty the estiamtor you get from an OLS estimation of   y_{it} -y_{i.} = B*(X_{it}-X_{i.}) + e_{it}
that is your transformation number 2, but there is not the correction in the error term.
This is the important point.

For this reason there is no serial correlation in the error and the only difference between (1) and (2) is in the
standard errors because in (1) the number of degrees of freedom is NT-N-K, while in (2) is NT-K.
(K is the number of varables in X, N is the nuber of individuals).

Anyway,the within estimation of the model  in Stata  ( xtreg  y  x ) automatically adjust for the number of degrees of
freedom.
That's why you have two exactly identical results.
______________________________

Enrico Pellizzoni
Borsa Italiana Spa
Research & Development
Piazza Affari, 6 - 20123 Milano
Tel: 02 72426 304
Fax: 02 86464323
E-mail: [email protected]


                                                                                                                                           
                      Eddy                                                                                                                 
                      <[email protected]>           To:       [email protected]                                            
                      Sent by:                         cc:                                                                                 
                      owner-statalist@hsphsun2.        Subject:  Re: st: panel within transformation cause serial correlation?             
                      harvard.edu                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      12/12/2003 16.28                                                                                                     
                      Please respond to                                                                                                    
                      statalist                                                                                                            
                                                                                                                                           
                                                                                                                                           



Eddy wrote:
> In a typical panel data model with individual fixed effect, we have
>
>    y_{it} = a_i + B*X + e_{it}, --- (1)
>
> where a_i is individual effect. Assume e_{it} is iid distributed
for
> i and t. A standard estimation procedure is to first do the
"within"
> transformation to get rid of the potentially large number of the
a_i
> dummies. The transformation essentially subtracts the group means
> from the variables:
>
>   y_{it} -y_{i.} = B*(X_{it}-X_{i.}) + (e_{it}-e_{i.}),  -- (2)
>
> where e_{i.} = (1/T) *(e_{i1} + e_{i2} + ... + e_{iT}).
>
> It can be shown numerically that OLS estimations on models (1) and
> (2) give you exactly the same results.
>
> My question is: In model (2), the transformed error term
> (e_{it}-e_{i.}) seems to be serially correlated within any given
> individual (i.e., for any i), but the OLS estimation assumes no
> correlation. Thus, how come the serial correlation can be ignored
> in estimating (2), and the results are still the same as (1)?
>
> To be more clear, consider the transformed error terms of
individual
> i in period t and t-1. They are
>
>  (e_{it}-e{i.})   = e_{it}   - (1/T) *(e_{i1} + e_{i2} + ... +
> e_{iT})
>  (e_{it-1}-e{i.}) = e_{it-1} - (1/T) *(e_{i1} + e_{i2} + ... +
> e_{iT})
>
> . I think they are correlated because of the common term on the RHS
> of the expressions.


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
*
*   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/



----------------------------------------------------------------------------
L'utilizzo non  autorizzato  del  presente  messaggio  �  vietato  e  potrebbe costituire  reato. Se il presente
messaggio non e' a Lei indirizzato, Le saremmo grati  se,  via  e-mail,  ne  comunicasse  l'errata  ricezione. Il
contenuto del presente  messaggio  non deve essere considerato come trasmesso o autorizzato da Borsa Italiana. Borsa
Italiana non si assume alcuna responsabilit� per eventuali intercettazioni, modifiche o danneggiamenti del presente
messaggio e-mail.

The unauthorized use of this e-mail is prohibited and could constitute an offence. Please notify Borsa Italiana
immediately by reply e-mail if you are not the intended recepient. The contents of this message shall be understood as
neither given nor endorsed by Borsa Italiana. Borsa Italiana does not accept liability for corruption, interception or
amendment, if any, or the consequences thereof.
----------------------------------------------------------------------------

(Embedded image moved to file: pic07579.pcx)

Attachment: pic07579.pcx
Description: Binary data




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