Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index