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]

st: For each loop


From   Ozgur Ozdemir <ozdemirozgur@hotmail.com>
To   Stata <statalist@hsphsun2.harvard.edu>
Subject   st: For each loop
Date   Sun, 30 Oct 2011 12:09:17 +0000

Hi,
I have the following list of variables tobin_q_2000, tobin_q_2001....tobin_q_2010 and would like to get some summary stats. i am using the following code but do not know why it does not work.
forvalues i=2000/2010{sum tobin_q_'i'}
it is giving the error message "tobin_q_ ambiguous abbreviation" and do not know why. any help is appreciated.


kind regards
Ozgur Ozdemir

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