Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: full length variable labels as matrix row names


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: full length variable labels as matrix row names
Date   Fri, 15 Jul 2011 09:42:46 +0100

Have a look at the help for -limits-. From memory I think that row and column names can not be as long as value labels, but check the limits for your version and flavour of Stata.

Nick

On 15 Jul 2011, at 04:04, Alex Olssen <alex.olssen@gmail.com> wrote:

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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index