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: Do-file: possible to program Dickey-Fuller?
From
steven quattry <[email protected]>
To
[email protected]
Subject
st: Do-file: possible to program Dickey-Fuller?
Date
Wed, 31 Mar 2010 10:12:50 -0400
Hello,
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
l
Thanks again for any help or ability to point me towards how I can
figure this out on my own.
-Steven
*
* 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/