Title

sutex2 -- LaTeX tables for summary statistics

Syntax

sutex2
[varlist]
[if] [in]
[weight]
[, options]

Statistics
minmax includes minimum and maximum in the table

percentiles(numlist) includes specified percentile(s) in the table

Text format
digits(#) sets the number of decimal digits to be printed; default is digits(3)

varlabels shows variable labels

na(string) prints the text string when missing values occur; default is na(.)

LaTeX options
caption(string) defines the caption of the table/longtable LaTeX environment

tablabel(string) defines the label of the table/longtable LaTeX environment

placement(string) specifies the position of the table in LaTeX documents

longtable produces the output as a longtable LaTeX environment

tabular produces only the tabular LaTeX environment

nocheck avoids the check for special characters

Output options
saving(string) saves the output as a file

append appends the output to an existing file

replace replaces the output file

by is allowed; see [D] by.

fweights and aweights are allowed; see weight.

Description

sutex2 produces LaTeX tables (table, longtable or tabular) including the number of observations, the mean and the standard deviation of varlist.
Optionally, you can include minimum, maximum and percentiles.

It extends and updates the sutex command by Antoine Terracol (2001).
Some of the options included in sutex are not present in sutex2, while others have been added. In particular, sutex2 allows the inclusion of percentiles.

Options

Statistics

minmax includes in the table also minimum and maximum values.

percentiles(numlist) includes in the output the percentile(s) specified by numlist among those computed by the summarize command, that is any combination of: 1, 5, 10, 25, 50, 75, 90, 95, 99.

Text format

digits(#) sets the number of decimal digits to be printed. It cannot be less than 0 or more than 20; default is digits(3).

varlabels shows variable labels instead of variable names.

na(string) prints the text string when missing values occur; default is na(.).

LaTeX options

caption(string) defines the caption of the table LaTeX environment. It prints a "\caption{string}" text in the first line of the output; default is caption(Summary statistics).

tablabel(string) defines the label of the table LaTeX environment. It prints a "\label{string}" text in the first line of the output; default is tablabel(sumstat).

placement(string) specifies the preferred position of the table in the page as an option of the table LaTeX environment; default is placement(htbp).

longtable produces the output as a longtable LaTeX environment instead of the default table. It should be specified only for a large number of variables.

tabular produces the tabular LaTeX environment without the table LaTeX environment. It cannot be specified together with longtable.
Moreover, caption and tablabel have no effects on the tabular.

nocheck avoids the special character replacement into LaTeX readable format.
By default the following characters: #, $, %, &, ~, _, ^, {, }, >, <, \ are replaced by the LaTeX-compatible counterparts (\#, \$, \%, \&, \~{}, \_, \^{}, \{, \}, \>, \<, $\backslash$).
It should be only specified if variable names or labels are already compatible with LaTeX.

Output options

saving(string) saves the output in the string file.
If this option is not specified, the output is printed in the result window only.
If no extension is declared, .tex is assumed.
If the string includes one "." character, what follows is assumed to be the extension. Therefore, if you want to include a "." in the file name, you need to specify the file extension as well.

i.e.: saving(myfile) and saving(myfile.tex) produce the same result (the output saved in myfile.tex),
while saving(my.file) and saving(my.file.tex) produce different results (the output is saved as my.file and my.file.tex, respectively).

append prints the output in the existing file identified by saving(string). It requires the option saving(string).

replace replaces the output file identified by saving(string). It requires the option saving(string).

Remarks

All the statistics displayed in the output derive from the summarize command.

All the variables in the dataset are shown if varlist is empty.

The header of the table is by default:

\begin[htbp]\centering\caption

placement(string) turns [htbp] in [string];

caption(string) changes the caption;

tablabel(string) changes the label;

tabular suppresses the header and the footer.

Examples

. sutex2

. sutex2, min perc(1 10 50 90 99) dig(2) varlab na(na) replace

. sutex2, pl(t!) caption(Any title) tablabel(tab_1) long append

Author

Francesco Scervini

Universitˆ di Torino

For any comment, bug-report, clarifications: francesco.scervini@unito.it