------------------------------------------------------------------------------- help forqrownameandqcolname(Roger Newson) -------------------------------------------------------------------------------

Extract lists of quoted row and column names from a matrix

qrownamematrix_name[ ,noisily]

qcolnamematrix_name[ ,noisily]

Description

qrownamereturns lists of double-quoted row equations, row names and row full names for a matrix specified bymatrix_name.qcolnamereturns lists of double-quoted column equations, column names and column full names for a matrix specified bymatrix_name. The lists are stored in the saved resultsr(eq),r(name)andr(fullname), containing lists of quoted row/column equation names, quoted row/column names and quoted row/column full names, respectively. The two commands work similarly to the macro extended functionsroweq,coleq,rownames,colnames,rowfullnamesandcolfullnames, but, unlike the macro extended functions, they return each name in double quotes. This is useful when row and column equations contain spaces or even single quotes, as sometimes happens with equation names for matrix estimation results generated by mlogit when the multinomial outcome variable has value labels. The returned lists can then be assigned to other matrices using the matrix roweq, matrix coleq, matrix rownames and matrix colnames commands.

Options

noisilyspecifies that the lists will be echoed to the Stata log.

Remarks

qrownameandqcolnamewill not fail if row and column names and/or equation names contain spaces and/or single quotes. Unfortunately, they will fail if a name contains an unpaired right double quote. Fortunately, this does not often happen in Stata, although it can be made to happen, by creating a string variable whose values contain unpaired right double quotes and then using encode to encode it to a numeric variable, which is then used as a multinomial outcome by mlogit.

Examples. qrowname mickey . matrix roweq matti=`r(eq)'

. matr def vera=e(V) . qcolname vera,noi

AuthorRoger Newson, King's College, London, UK. Email: roger.newson@kcl.ac.uk

Also seeManual:

[P] matrix rownames,[P] matrix define,[P] macroOn-line: help for matrname, matrix, macro, mlogit