Here is a description...
table1 generates a "table 1" of characteristics for a manuscript. Such a table generally includes a collection of baseline characteristics which may be either continuous or categorical. The observations are often grouped, with a "p-value" column on the right comparing the characteristics between groups.
The vars option is required and contains a list of the variable/s to be included as rows in the table. Each variable must also have a type specified (contn, conts, cat, cate, bin or bine - see above). If the observations are grouped using by(), a significance test is performed to compare each characteristic between groups. contn variables are compared using ANOVA, conts variables are compared using the Wilcoxon rank-sum (2 groups) or Kruskal-Wallis (>2 groups) test, cat and bin variables are compared using Pearson's chi-squared and cate and bine variables are compared using Fisher's exact test. Specifying the test option adds a column to the table describing the test used.
The display format of each variable in the table depends on the variable type. For continuous variables the default display format is the same as that variable's current display format. You can change the table's default display format for continuous variables using the format() option. For categorical variables the default is to display the proportion using either 0 or 1 decimal place depending on the total frequency. After each variable's type you may optionally specify a display format to override the table's default.
The list of variables is delimited using a backslash (\).
The resulting table may be saved to an Excel file using the saving() option. The file_spec contains the file path and optionally ", replace" to replace any existing file. You can also specify the sheet of the Excel file using ", sheet(sheetname)".
The resulting table can be kept in memory, replacing the original dataset, using the clear option.