Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: For each loop

From   Ozgur Ozdemir <>
To   Stata <>
Subject   st: For each loop
Date   Sun, 30 Oct 2011 12:09:17 +0000

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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index