<>
Tiago said
Taking the simple lines below, is it possible to create matrices
TEST_1 to
TEST_100 too?
*/-----------------START--------------
clear
set obs 100
gene MATA = round(uniform()*45)
gene RULES = round(uniform()*15)
mata
X = st_data(.,("MATA", "RULES"))
Y = st_data(.,("RULES", "MATA"))
for (i=1; i<=100; i++) {
TEST = X[i,1]\Y[i,1]\X[i,1]\Y[i,1]
}
end
*/-----------------END-----------------
No. See http://ideas.repec.org/a/tsj/stataj/v8y2008i3p401-412.html
for details. You are redefining the matrix TEST 100 times, not
creating 100 matrices. To do the latter it is most helpful to use
pointers.
Kit
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/