Statalist


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

st: RE: loop over variables using arch


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: loop over variables using arch
Date   Thu, 16 Apr 2009 20:46:44 +0100

Local macro references start with left single quotes `. I can't see your
keyboard from here, but it will be a different key from that for ',
single quote or (here) right single quote. Certain word processors let
you be lazy about the difference and apply the smartness on your behalf,
but you must type them differently for Stata. 

Stata in fact has a double principle: Stata is smart, but so must you
be, otherwise why did you choose Stata? 

The explanation is the same as that in a concurrent thread started by
Thomas Jacobs. You couldn't nest local macros otherwise, and you do need
to do that. 

Nick 
n.j.cox@durham.ac.uk 

Moo Hwan Kim
 
I would like to know what's wrong with the following message.
 
foreach x of varlist win1-win122{
      arch 'x' l.'x', arch(1)
 
' invalid name
r(198);
I attempted to run arch model for each of rolling windows, which is 122.
Could you tell me what it goes wrong?
 

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index