{smcl} {* 28/Feb/2021}{...} {vieweralsosee "[R] mtable1" "help matrix"}{...} {cmd:help mmat}{right: ({browse "http://medical-statistics.dk/MSDS/statistics/stata/package/package.html":User-written stata packages: mtab})} {hline} {title:Title} {p 4 4 2}{hi:mtable1} {hline 2} Create {helpb matrix} and Excel file with key information for Table 1 in a scientific article. {title:Syntax} {p 8 17 2} {cmd:mtable1} {helpb varlist} [{cmd:,} {it:options} ] {p 8 17 2} {helpb varlist} indicates name of the exposure variable. {synoptset 21 tabbed}{...} {synopthdr} {synoptline} {syntab :Options} {synopt :{opt CAT:var}}indicates the {helpb varlist} of categorical variables.{p_end} {synopt :{opt CON:var}}indicates the {helpb varlist} of continuous variables.{p_end} {synopt :{opt MP:utexcel}}indicates the output will be put into an Excel file under the current working folder.{p_end} {synopt :{opt EN:ame}}indicates the name of the Excel file. The default name is mtable1 {p_end} {synopt :{opt CATN:ame}}indicates the sheet name for the categorical variables in the Excel file. The default name is Categorical {p_end} {synopt :{opt CATL:ist}}indicates the list of column names in the Excel file for categorical variables {p_end} {synopt :{opt CATR:ow}}indicates the starting row-number for the categorical variables in the Excel file. The default name is 5 {p_end} {synopt :{opt CONN:ame}}indicates the sheet name for the continuous variables in the Excel file. The default name is Continuous {p_end} {synopt :{opt CONL:list}}indicates the list of column names in the Excel file for continuous variables {p_end} {synopt :{opt CONR:row}}indicates the starting row-number for the continuous variables in the Excel file. The default name is 5 {p_end} {synoptline} {title:Description} {pstd} Command {helpb mtable1} Create {helpb matrix} and Excel file with key information for Table 1 in a scientific article.{p_end} {title:Options} {phang} {opt catvar} specify a {helpb varlist} of categorical variables that should be presented in Table 1 . {phang} {opt convar} specify a {helpb varlist} of continuous variables that should be presented in Table 1. {phang} {opt mputexcel} indicates matrix output will be put into Excel file. This option must be combined with the either catlist or conlist or both. {phang} {opt ename} indicates the name of the Excel file. The default name is mtable1.xlsx. {phang} {opt catname} indicates sheet name for categorical variables. The default name is Categorical. {phang} {opt catlist} indicates colname names for categorical variables. {phang} {opt catrow} indicates starting row-number for categorical variables. {phang} {opt conname} indicates sheet name for continuous variables. The default name is Continuous. {phang} {opt conlist} indicates colname names for continuous variables. {phang} {opt conrow} indicates starting row-number for continuous variables. {title:Examples} {pstd} {phang} 1. Basic use {p_end} {phang}{stata "webuse lbw, clear": .webuse lbw, clear} {p_end} {phang}{stata "mtable1 smoke, cat(race ptl ht ui ftv) con(age lwt) mp catlist(D E F G H) conlist(D E F G H I)": .mtable1 smoke, cat(race ptl ht ui ftv) con(age lwt) mp catlist(D E F G H) conlist(D E F G H I)} {p_end} {title:More examples} click on {browse "http://medical-statistics.dk/MSDS/statistics/stata/package/mtable1/mtable1.html":her} {title:Author} {pstd} Chunsen Wu, the University of Southern Denmark; Odense University Hospital, Denmark{break} {browse cwu@health.sdu.dk}{break} {browse chunsen.wu@rsyd.dk} {title:Also see} {p 7 14 2}