{smcl} {hline} help for {cmd:qrowname} and {cmd:qcolname} {right:(Roger Newson)} {hline} {title:Extract lists of quoted row and column names from a matrix} {p 8 15}{cmd:qrowname} {it:matrix_name} [ , {cmdab:n:oisily} ] {p 8 15}{cmd:qcolname} {it:matrix_name} [ , {cmdab:n:oisily} ] {title:Description} {p} {cmd:qrowname} returns lists of double-quoted row equations, row names and row full names for a matrix specified by {it:matrix_name}. {cmd:qcolname} returns lists of double-quoted column equations, column names and column full names for a matrix specified by {it:matrix_name}. The lists are stored in the {help return:saved results} {cmd:r(eq)}, {cmd:r(name)} and {cmd:r(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 {help macro:macro extended functions} {cmd:roweq}, {cmd:coleq}, {cmd:rownames}, {cmd:colnames}, {cmd:rowfullnames} and {cmd:colfullnames}, 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 {help estimates:matrix estimation results} generated by {help mlogit} when the multinomial outcome variable has value labels. The returned lists can then be assigned to other matrices using the {help matrname:matrix roweq}, {help matrname:matrix coleq}, {help matrname:matrix rownames} and {help matrname:matrix colnames} commands. {title:Options} {p 0 4}{cmd:noisily} specifies that the lists will be echoed to the Stata log. {title:Remarks} {p} {cmd:qrowname} and {cmd:qcolname} will 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 {help encode} to encode it to a numeric variable, which is then used as a multinomial outcome by {help mlogit}. {title:Examples} {p 16 20}{inp:. qrowname mickey}{p_end} {p 16 20}{inp:. matrix roweq matti=`r(eq)'}{p_end} {p 16 20}{inp:. matr def vera=e(V)}{p_end} {p 16 20}{inp:. qcolname vera,noi}{p_end} {title:Author} {p} Roger Newson, King's College, London, UK. Email: {browse "mailto:roger.newson@kcl.ac.uk":roger.newson@kcl.ac.uk} {title:Also see} {p 0 10} {bind: }Manual: {hi:[P] matrix rownames}, {hi: [P] matrix define}, {hi:[P] macro} {p_end} {p 0 10} On-line: help for {help matrname}, {help matrix}, {help macro}, {help mlogit} {p_end}