Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: full length variable labels as matrix row names


From   Alex Olssen <alex.olssen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: full length variable labels as matrix row names
Date   Fri, 15 Jul 2011 15:04:30 +1200

Hi everyone,

I have made a matrix to collect the results of some unit root tests.
I would like the matrix row names to be the value labels of the variables.
Unfortunately they get contracted with the ~.
Is there a way around this?

For example

sysuse auto, clear
matrix define A = J(3, 1, 0)
foreach v of var make price rep78 {
	local lbl`v': variable label `v'
}
matrix rownames A = "`lblmake'" "`lblprice'" "`lblrep78'"
matrix list A

And the names of the "make" and "rep78" rows are contracted with a ~

I have looked around on the Statalist archives and also on Google but
haven't turned up anything.

Kind regards,

Alex
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index