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

Re: st: problem with macro in a loop

From   Leila Ben Aoun <>
Subject   Re: st: problem with macro in a loop
Date   Wed, 10 Jun 2009 10:46:21 +0200

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:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index