Thanks to Martin Weiss, Tirthankar Chakravarty and Nick Cox for their
replies. I used the solution from Tirthankar Chakravarty with local
instead og global and it worked.
/* begin */
sysuse auto, clear
local M_1 "gear_ratio displacement turn"
local M_2 "length weight trunk"
local M_3 "headroom rep78 mpg"
forv i=1/3 {
logit foreign `M_`i''
estimates store logit_M_`i' , title(M_`i')
}
/* end */
*
* 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/