Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Storing test statistics from dfuller output


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Storing test statistics from dfuller output
Date   Sun, 4 Jul 2010 21:17:39 +0200

<> 

You can have -statsby- record the results for you:

*************

webuse air2, clear
gen byte myranges=irecode(time, 1948, 1953, 1957, 1961)

statsby r(Zt), by(myranges) clear : dfuller air, lags(3)
l

*check results
webuse air2, clear
gen byte myranges=irecode(time, 1948, 1953, 1957, 1961)
forv i=1/3{
dfuller air, lags(3), if myranges== `i'
}
*************


See NJC`s http://www.stata-journal.com/article.html?article=gr0045



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Dani Tilley
Gesendet: Sonntag, 4. Juli 2010 19:33
An: [email protected]
Betreff: st: Storing test statistics from dfuller output

Hi,

I need to run -dfuller- tests on several countries and collect the test
statistic from each, store it, and compute its mean (or possibly divide by a
scalar). I tried the following but didn't get what I was looking for. 


quietly levelsof(country)
gen pm=.
foreach a in `r(levels)' { 
quietly dfuller cpi if country==`a', lags(3)
replace pm = r(Zt) if country==`a'
}

Any help would be appreciated.

Thanks,
DF Tilley


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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index