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]

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

From   steven quattry <>
Subject   st: Do-file: possible to program Dickey-Fuller?
Date   Wed, 31 Mar 2010 10:12:50 -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.

I am using Stata /SE 9.2 for Windows.

The code thus far is as follows:

tempname memhold
tempfile results
 postfile `memhold' str20 name double t using `results', replace
foreach var  of varlist dfxioc-dnd1vlme5 {
local name  "`var'"
        qui reg dfxioc `var'
        matrix e =e(b)
        matrix v = e(V)
        local t = abs(e[1,1]/sqrt(v[1,1]))
        post `memhold' ("`name'") (`t')

postclose `memhold'
use `results', clear
drop if t<1.70
gsort -t

Thanks again for any help or ability to point me towards how I can
figure this out on my own.
*   For searches and help try:

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