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

st: tempname


From   "Jun Xu" <mystata@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: tempname
Date   Fri, 04 Oct 2002 11:22:06 -0500

Al Statalisters:

I have a question related to tempname. I have a series of matrices obtained through post-estimation, and the number of matrices is determined by the info in the return or est list. Further, I need to tempname these matrices. I thought of an awkward way, not sure if there is any command in Stata can take care of that. To make my question clear, I use a mock example that's similar to mine, but much simpler:
*******************************************************
capture program drop what
program define what
forval i=1/4 {
tempname mat`i'
}
forval i=1/4 {
mat `mat`i''=[`i']
mat list `mat`i''

}
end

what
*******************************************************

Is there any options after tempname that can facilitate such needs especially when I have several, not just the mat`i''s. Many thanks.

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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index