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: RE: AW: Storing test statistics from dfuller output
From
"Nick Cox" <[email protected]>
To
<[email protected]>
Subject
st: RE: AW: Storing test statistics from dfuller output
Date
Mon, 5 Jul 2010 10:33:50 +0100
This is less surprising the more you think about it. In essence,
-syntax-, or its equivalent for inbuilt commands, ignores parentheses
around varlists. This helps in supporting some commands which demand
parenthesised varlists.
However, my guess is that Dani was just following some reflex from
experience with other languages.
Incidentally, "didn't get what I was looking for" is not much of a
problem report! One reason for that code to fail would be if -country-
were a string variable.
Nick
[email protected]
Martin Weiss
BTW, surprisingly, your -quietly levelsof(country)- does not induce
Stata to
scream "Syntax error"! Turns out you can use this syntax in many other
cases:
*************
sysuse auto, clear
reg(price) weight length
su(weight)
su(weight length)
*************
Dani Tilley
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'
}
*
* 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/