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 on April 23, and its replacement, is already up and running.

[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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index