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 on April 23, and its replacement, 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 <>
To   "" <>
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.


On 15 Jul 2011, at 04:04, Alex Olssen <> 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,

*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index