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

RE: st: looping with augmented dickey fuller test

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: looping with augmented dickey fuller test
Date   Wed, 15 Oct 2003 14:40:04 +0100

Dev Vencappa
> Ernest, Nick
>  many thanks to you both for your solutions which work 
> finely. I have rewritten the command to accomodate my 
> dataset based on what one of you suggested as follows:
> local z "netprem disclm elr solv"
> foreach k of local z{
> forvalues x=1/19{
> preserve
> keep if comcode==`x'
> tsset year
> postfile myhandledf  comcode dfstat`k' using 
> "c:\unitroot\dfunitrootlag`k'comp`x'", replace
> summ AICoptlag`k' if comcode==`x', mean
> dfuller `k', lags(`r(mean)') reg
> scalar DFSTAT`k'=r(Zt)
> post myhandledf (`x') (DFSTAT`k') 
> postclose myhandledf
> restore
> }
> postutil clear
> }
>  Above seems to be doing exactly what I wanted it to do. 

Thanks for this. 

If I understand you correctly, you are splitting 
the results of one analysis among 76 different files. 

I guess that questions can go validly in both 
directions, and I'm very curious here. 

Why is this what you want to do? 
Don't these results belong together? 

[email protected] 

*   For searches and help try:

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