Line for the server...
What is that -fitted- option to -whitetst-? I have
. which whitetst
c:\ado\plus\w\whitetst.ado
*! whitetst 1.2.0 CFB/NJC 11 Oct 1999 rev for _rmcoll (STB-55: sg137)
and Stata says it does not know this option.
Anyway, why do you not use the lag opertors in - help tsvarlist- for your
-reg-?
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Clive Nicholas
Sent: Tuesday, December 09, 2008 9:00 AM
To: [email protected]
Subject: st: Running simple autocorrelation regressions using -forval-
Stata 9.2, Windows XP
I'm having trouble executing this -forval- code:
webuse nlswork
reg ln_wage age race grade if year==68
predict r1, r
whitetst, fitted
forval i=69(1)88 {
reg ln_wage age race grade if year==`i'
predict r`i', r
reg r`i' r`i_[n-1]'
whitetst, fitted
}
The problem, of course, is with -reg r`i' r`i_[n-1]'-, which chokes
with the error code:
r ambiguous abbreviation
r(111);
Even after checking -h forval-, I can't find a satisfactory way of
getting Stata to automate the second residual term, which should be
the one estimated for the year before the first one in each
-regress-ion.
All solutions gratefully received.
--
Clive Nicholas
[Please DO NOT mail me personally here, but at
<[email protected]>. Please respond to contributions I make in
a list thread here. Thanks!]
"My colleagues in the social sciences talk a great deal about
methodology. I prefer to call it style." -- Freeman J. Dyson.
*
* 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/
*
* 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/