Hi,
I want to loop over 150 variables, which has the format like code_001, code_002, ....., code_150. I've tried:
foreach i in 001/150
or
forvalues i in code_001-code_150
or
foreach i in 001-150
However, none of them works.
Could you please help me to correct the syntax.
Thank you!
Related Posts with For loop in Stata
Using Weights for countries in Survey DatasetHello everyone, I am working with 2 waves (5 and 6) of World Value Survey in Stata 15 and I am anal…
Foreach and gen ? Help please(Don't speak english, Hope you can understand) Hi, I was wondering if is possible making a loop to f…
Using foreach for two set of groupsDear All, I have two groups of countries and pairwise data- importers and exporters. Eg. Importers=…
estimate of theta = . in Cox shared frailty model using MIDear Statalist Members, I am not able to see the estimate of theta or the se of theta using e-return…
Combine two strings with entry that has more informationDear statalists, I have two variables that capture the same thing but with differing precision. One…
Subscribe to:
Post Comments (Atom)
0 Response to For loop in Stata
Post a Comment