Hello. I would like to access a number of locals in mata using a for loop and ideally create an equal number of objects with the values. The following code does not work but it gives an idea of what i am trying to do:
Code:
local foo1 = 1
local foo2 = 2
local foo3 = 3
for(i=1; i<=3; i++) {
foomata[i] = st_local("foo`i'")
}

Comment