Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: matrix stack and macro (Jun Xu)


From   "Arthur Mu" <[email protected]>
To   [email protected]
Subject   st: matrix stack and macro (Jun Xu)
Date   Sat, 13 Jul 2002 14:17:21 -0500

One more question about matrix in ado program.

*******************************
tempname A A1
...
...
...
sum `var'
matrix `A'=(`r(mean)')
matrix `A1'=nullmat(`A1')\`A'
*******************************
The purpose of using tempnames, as we know, is to make all the names temporary within this program in case any naming conflict from what's left over before we invoke this program. No problem with it. However, it seems that the last line "matrix `A1'=nullmat(`A1')\`A'" simply not working. I have tried around and found out that I have to use a real named matrix like A instead of the macro-referred `A' for this line of syntax to work. Is that true that no matter what, I have to put a matrix name, instead of a local macro after "\" to stack matrix? Thanks ahead!!!

Jun Xu
Department of Sociology
Indiana University at Bloomington



_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index