Export summary statistics to LaTeX

The ado-file --sutex-- (has to be installed by typing --findit sutex-- into the Stata command window) provides a simple way to export summary statistics from Stata to a separate LaTeX-file. It is limited in individualised adjustment, but quite OK for most applications. By default, you get mean and standard deviation for variables VAR1, VAR2, VAR3, etc. A syntax could be: Continue reading “Export summary statistics to LaTeX”

Table of descriptives

Posted by Didier

This illustrates ways to make a tables of descriptives (mean or something else) for many variables (say wage, tenure, education, …) and several groups (say males and female). Neither summarize or tabstat are useful if the variables are many. With summarize, you would need to cut, paste and edit the output in e.g. Excel. With tabstat, the tabel would be too wide. Continue reading “Table of descriptives”

Using locals and loops to generate long strings

The following command can be used to generate a command which consists of several new variables which are generated within a loop.

This could either be done by (e.g. generating a number of log variables)
gen newvar1 = log(var1)
gen newvar2 = log(var2)
Continue reading “Using locals and loops to generate long strings”