Answers for "forvalues in stata"

1

use forvalues stata

> local mcode 0
> local month jan feb mar apr
> foreach m of local month {
    local mcode = `mcode' + 1
    display "`mcode': `m'"
   }
1: jan
2: feb
3: mar
4: apr
Posted by: Guest on October-17-2020
0

use forvalues stata

* define a local macro called month
> local month jan feb mar apr

> display `"`month'"' 
jan feb mar apr
Posted by: Guest on October-17-2020

Browse Popular Code Answers by Language