Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Creating object names in Mata through looping

From   Pedro Nakashima <>
Subject   st: Creating object names in Mata through looping
Date   Fri, 28 Dec 2012 23:58:21 -0200

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')

void funcao2(real scalar inicio,real scalar fim,real scalar byi)

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:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index