{smcl} {* 09aug2004}{...} {hline} help for {hi:_mrsvmat}{right:(SJ5-1: st0082)} {hline} {title:Post-{help mrtab} utility} {p 8 15 2} {cmd:_mrsvmat} [ {cmd:,} {cmdab:s:tat:(}{it:statname}{cmd:)} {cmdab:rt:otal} {cmdab:ct:otal} {cmdab:nop:ercent} {cmdab:nol:abel} {cmd:clear} ] {p 4 8 2}where {it:statname} is {c -(} {cmdab:f:req} | {cmdab:co:lumn} | {cmdab:r:ow} | {cmdab:ce:ll} | {cmdab:rcol:umn} | {cmdab:rce:ll} {c )-} {title:Description} {p 4 4 2} {cmd:_mrsvmat} can be used after {help mrtab} to create a data matrix from the results left behind (note that the data in memory will be lost). Do not use {cmd:_mrsvmat} unless you are confident that {help mrgraph} does not meet your needs. {p 4 4 2} Each row of the data created by {cmd:_mrsvmat} will represent one response category. The variables are: {p 8 20 2}R {space 10}Values/names of the response categories. {p 8 20 2}L {space 10}Labels of the response categories (if available). {p 8 20 2}C1, C2, ... Frequencies. Each variable represents one column of the two-way frequency table. In the case of one-way tables, just one variable, C1, will be created. {p 8 20 2}T {space 10}Row totals (optionally). {title:Options} {p 4 8 2} {cmd:clear} allows {cmd:_mrsvmat} to clear the data in memory without asking for confirmation. {p 4 8 2} {cmd:ctotal} specifies that column totals be saved. {p 4 8 2} {cmd:nolabel} specifies that labels be ignored. {p 4 8 2} {cmd:nopercent} specifies that relative frequencies be formatted as proportions (.271) rather than percentages (27.1). {p 4 8 2} {cmd:rtotal} specifies that row totals be saved. {p 4 8 2} {cmd:stat(}{it:statname}{cmd:)} determines the statistic to be saved. {it:statname} is either {cmd:freq} for raw frequencies or {cmd:column} (base: column total of observations), {cmd:row} (base: row total), {cmd:cell} (base: grand total of valid observations), {cmd:rcolumn} (base: column total of responses), or {cmd:rcell} (base: grand total of responses) for relative frequencies. {cmd:stat(freq)} is the default. {title:Example} {p 8 12 2}{cmd:. use http://fmwww.bc.edu/RePEc/bocode/d/drugs.dta}{p_end} {p 8 12 2}{cmd:. mrtab crime1-crime5, include response(2 3) by(sex) nofreq}{p_end} {p 8 12 2}{cmd:. preserve}{p_end} {p 8 12 2}{cmd:. _mrsvmat, stat(column) ctotal rtotal clear}{p_end} {p 8 12 2}{cmd:. list, clean string(20)}{p_end} {p 8 12 2}{cmd:. generate x=_n}{p_end} {p 8 12 2}{cmd:. scatter C1 C2 x in 1/5, xtitle(Type of crime) ytitle(Percent) title(Criminal experiences (as a victim))}{p_end} {title:Author} {p 4 4 2} Ben Jann, ETH Zurich, jann@soz.gess.ethz.ch {title:Also see} {p 4 13 2} Manual: {hi:[P] matrix mkmat} {p 4 13 2} Online: help for {help mrtab}, {help mrgraph}, {help svmat}