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

From |
Rufus Peabody <rufus.peabody@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: autocorrelation in panel data |

Date |
Tue, 19 Aug 2008 01:00:55 -0700 |

To make this more concrete, here is what I have done--as you can see, the autocorrelation is definitely the further back you lag, but there is a lot of noise in this that I'd like to eliminate. I.e. in the future I would not expect kpct to be more correlated with L4.kpct than with L1.kpct.

. regress kpct LY_adjkpct_norm LY_adjkpct_norm_Iobs L(1/10).kpct if L10.year==year

Source | SS df MS Number of obs = 18923

-------------+------------------------------ F( 12, 18910) = 357.69

Model | 28.7720099 12 2.39766749 Prob > F = 0.0000

Residual | 126.758615 18910 .006703258 R- squared = 0.1850

-------------+------------------------------ Adj R- squared = 0.1845

Total | 155.530625 18922 .008219566 Root MSE = .08187

------------------------------------------------------------------------------

kpct | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------------- +----------------------------------------------------------------

LY_adjkpct~m | .0423668 .0031874 13.29 0.000 .0361193 . 0486143

LY_adjkpct~s | 9.46e-06 2.15e-06 4.40 0.000 5.25e-06 . 0000137

kpct |

L1. | .0670691 .0072904 9.20 0.000 . 0527794 .0813589

L2. | .0611926 .0073193 8.36 0.000 . 0468461 .0755391

L3. | .0634665 .0073307 8.66 0.000 . 0490977 .0778354

L4. | .0710584 .0073266 9.70 0.000 . 0566976 .0854192

L5. | .067266 .0073745 9.12 0.000 . 0528113 .0817207

L6. | .0568484 .007405 7.68 0.000 . 042334 .0713628

L7. | .0420981 .0073926 5.69 0.000 . 0276079 .0565882

L8. | .0485835 .0073626 6.60 0.000 . 0341522 .0630149

L9. | .0450147 .007324 6.15 0.000 . 0306591 .0593704

L10. | .0513367 .0072931 7.04 0.000 . 0370416 .0656318

_cons | .0209256 .002381 8.79 0.000 . 0162587 .0255925

------------------------------------------------------------------------------

On Aug 19, 2008, at 12:54 AM, Rufus Peabody wrote:

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/

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

**References**:**st: autocorrelation in panel data***From:*Rufus Peabody <rufus.peabody@gmail.com>

- Prev by Date:
**st: autocorrelation in panel data** - Next by Date:
**st: RE: creating a large set of dummies** - Previous by thread:
**st: autocorrelation in panel data** - Index(es):

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