Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

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

From   Kit Baum <>
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 Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index