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
returnsyh command donwloads historical data for any ticker with historical data in Yahoo - ErrorHi, I am getting the following error with returnsyh command donwloads historical data for any ticke…
Maximizing Sharpe Ratio - Portfolio optimizationHi, I would like to maximize the Sharpe ratio (=Historical Return (portfolio)/Standard deviation(po…
Combination of If and or ClausesHey there, I am original a python programmer and must use Stata to access the Data of a research Ins…
Appending files in folderDear all, I am struggling for appending files in a folder. Now I have multiple datasets such as ho…
Need help on predicting a value of dependent variableHi, I've recently started learning statistics. On stata, how can I get the predicted value of a depe…
Subscribe to:
Post Comments (Atom)
0 Response to For loop in Stata
Post a Comment