This should work if the string values
are acceptable as row names:
sysuse auto
gen M = word(make,1)
replace M = subinstr(M, ".","",.)
mkmat mpg weight, matrix(A)
forval i = 1/`=_N' {
matname A `=M[`i']', row(`i') explicit
}
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Faye Turner
> How do I tell STATA to use the first column (a string variable) of my
> dataset as the row names when converting variables to a matrix?
*
* 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/