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
How to generate two variables from a variable?Hi guys, I have a group variable (GROUPS8) and I want to generate two new variables from it- Caste a…
Download and unzip file with StataHi, I was wondering if it is possible to download a *.zip file from a website, unzip the *.csv file…
How to clear preserve? "Already preserve error"Hi, I have been running a piece of code through various universe of assets and I am getting the "al…
Replacing pieces of code with one lineIs there a code with which i can replace certain areas of a larger code while only one line For exa…
ConditionalsHI how can I change this list ??? converting those texts to missing? x: sales in $ x | Freq. Perc…
Subscribe to:
Post Comments (Atom)
0 Response to For loop in Stata
Post a Comment