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]

re: st: Do-file: possible to program Dickey-Fuller?


From   Kit Baum <[email protected]>
To   [email protected]
Subject   re: st: Do-file: possible to program Dickey-Fuller?
Date   Wed, 31 Mar 2010 10:47:39 -0400

<>
I am on a quest to create a do-file that would perform bi-variate
regressions, sort by t-score, delete observations below a certain
threshold, and then run Dickey-Fuller on the remaining set of
variables and list only those that pass a Dickey-Fuller test at the 1%
critical level.

Below is the code I have typed with the help of some people, but I am
now unsure how to proceed with the Dickey-Fuller portion.  If anyone
can at the very least pont me in the right direction of how I might
learn to do this, I would be very appreciative.

It is certainly possible to program your own D-F regression, but it will be a hassle to get the critical values. Easier by far to just use the built-in routine and grab its return values:

webuse wpi1
dfuller D.wpi
ret li

you will find the p-val there, which you can compare to your desired level of confidence to decide whether to use the variable or not.

NB: most people would find a DF-GLS test more reliable than a D-F test (help dfgls). Unfortunately Stata's official dfgls does not return critical values.

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


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