help for sutex                                               (Antoine Terracol)
Generates LaTeX code for summary statistics tables.

[by varlist : ] sutex [ varlist ] [ if ] [ in ] [ weights ], [digits(integer)] [labels] [par] [nobs] [minmax] [na(string)] [title(string)] [key(string)] [longtable] [placement] [nocheck] [file(string)] [append] [replace]


sutex generates LaTeX code for summary statistics tables. If file(string) is specified, the code is written to the specified file (if replace is not specified, then the code is appended to the existing file, if any).

Otherwise, the code is displayed in the output window.

When longtable is selected, and if you \usepackage{longtable} in the preamble of your TeX document, tables can span over several pages

The [digits(integer)] option defines the number of digits to be displayed (default is 3).

The [labels] option allows to display variable labels (if they exist) instead of variable names.

The [par] option adds parentheses to Std. Dev.

The [nobs] option adds a column with the number of observations for each variable (automatically specified if variables do not have the same number of observations).

The [minmax] option adds two columns with the minimum and maximum of each variable.

The [na(string)] option allows to define the content of cells where a numerical value has no sense (for example a Std. Dev. for only one observation). ATTENTION : do not use the following characters # $ % & ~ _ ^ \ { } in that option.

The [title(string)] option defines the table title (Summary statistics is default).

The [key(string)] option defines the table label (sumstat is default).

The [longtable] option allows to create tables that span over several pages using the "supertabular" package (do not forget to \usepackage{longtable} in the preamble of your .tex document)

The [placement] option specifies the placement of the table in the .tex doc (default is htbp)

The [nocheck] option skips the LaTeX special characters search-and-replace routine. This option should be used in two cases : - either you are sure there are no LaTeX special characters within variable names or labels, and want to speed-up the command, - or you deliberately included LaTeX special characters and do not want sutex to translate them.

The [file(string)] writes the LaTeX code in the specified ASCII file (if no extension is given, .tex is assumed), nothing is diplayed in the output window.

The [append] option (to be used in conjunction with file(string)) appends the code to the specified file.

The [replace] option (to be used in conjunction with file(string)) overwrites any existing file with the same name.

If the LaTeX code is displayed in the output window, one just has to copy/paste it into a LaTeX editor (in Scientific Word, it has to be pasted into a "TeX field")

If a file is written, sutex displays "file filename saved". The content of filename can be viewed by clicking on it.


. sutex if foreign==0, labels digits(5)

. by foreign : sutex, labels minmax longtable key(ltab)

. sutex, labels file(C:/myfiles/mytables.tex) replace

. by foreign : sutex, labels file(C:/myfiles/mytables.tex) append

Also see

On-line: help for summarize help for outtex, maketex, outreg, outtable if installed


Questions, comments and bug-reports can be sent to terracol@univ-paris1.fr -------------------------------------------------------------------------------