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 at the end of May, and its replacement, statalist.org is already up and running.


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

re: RE: st: For each loop


From   Christopher Baum <kit.baum@bc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   re: RE: st: For each loop
Date   Sun, 30 Oct 2011 10:30:05 -0400

<>
thanks for your help. 
sum tobin_q_* works. 
However, I also tried
forvalues i=2000/2010 {sum tobin_q_'i'}
and it gave the same error message. Do you know why it might happen ?

Because you didn't heed my prior message. 

Furthermore it looks like you are using ' on the LHS of the macro rather than `. Read my recent posting "Code from Stata Journal" about the difference.

Kit


Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                             An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
  An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


*
*   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   |   Site index