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?
Nick
[email protected]
*
* 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/