I built a for loop with locals in it so that I can have parallel loops of a varlist and a numlist. I want to generate a new variable in each loop that equals to the product of the variable from the varlist and the number from the numlist, but I ended up getting a repeating string (see the graph below) I also attached my codes below. How can I get the product I want -- 136*7 instead of seven 136 connected together for example? Thanks!
Array
Array
Related Posts with Parallel loop with numlist and varlist
How to locate the observations with string IDs sharing some substrings?For example, I want to change the values of observations for the variable "execution_location" inclu…
Very easy question but troubleing me...Hi guys, I am a new STATA user and I want to ask a very amateur question about date and formatting. …
difference of timeDear All, I was asked this question (here). The data set is Code: * Example generated by -dataex-. …
Panel data survival modelHello everyone! I have a country code year panel data. I want to create a duration variable (dur_reg…
Need Help on STATA loopHello, Everyone, I want to assign individuals (id) into groups of five (group) in the following pat…
Subscribe to:
Post Comments (Atom)
0 Response to Parallel loop with numlist and varlist
Post a Comment