Dear Stata users
I'm looking for a way to create object names in Mata through looping.
For example:
capture program drop progby1
program progby1, byable(recall,noheader)
local inicio = _byn1()
local fim = _byn2()
local rodada = _byindex()
local in "`inicio'/`fim'"
display "`in'"
mata: funcao2(`inicio',`fim',`rodada')
end
mata
void funcao2(real scalar inicio,real scalar fim,real scalar byi)
{
d=st_data((inicio::fim),("var1","var2"))
d
}
end
I would like that the matrix d of the function funcao2 had varying
names, depending on the value of argument byi
Does anyone know a solution to this problem?
Thank you..
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/