Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: autocorrelation in panel data


From   Rufus Peabody <rufus.peabody@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: autocorrelation in panel data
Date   Tue, 19 Aug 2008 00:54:38 -0700

Hi all,

I'm dealing with data where I'm trying to predict a variable based on previous values of that variable. I have an unbalanced panel. I have no problems getting the coefficient for each lag of the variable:

(data is already tsset with a panel variable and time variable)

foreach v of local vars {
regress `v' L(1/10).`v' LY_`v'_norm LY_`v'_norm_intobs if L10.year==year
}

, where `v' is the variable, LY_`v'_norm is the normalized average of the variable for the particular panel during the previous year & LY_`v'_norm_intobs is an interaction of LY_`v'_norm and the number of observations for that panel the previous year. (Since there is a lot of luck inherent in the variable in a short-run period, I'm including these so I can "regress to the mean" the variable as appropriate.

While the results of this regression are not problematic (shown below), I would like a way to fit a curve which takes out all the noise from including a bunch of lags. - corrgram - does not seem to work with panel data. I should point out that there are no fixed effects. I would like to fit a decay function that I can apply to all panels.

Thanks!
-Rufus
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* 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