Various Stata packages can be used to output LaTeX code directly from Stata, and can be used together with Lablogger. Note that some packages have their own particular syntax, this page can be used a reference how to combine them with Lablogger:
Outputting summary statistics
The LaTeX equivalent of the summary command:
- sutex
Example
sysuse auto summary auto * Now include in Lablogger: sutex, file("sutex_output.tex") lablogger table using "sutex_output.tex", caption("Summary statistics") * Note that prefix notation will not work with sutex (no "using" component)
Outputting tables
The LaTeX equivalent of the tabstat command:
- latabstat (latab package)
tabstat price mpg weight, by(foreign) * Note: do not include the .tex suffix in the filename latabstat price mpg weight, by(foreign) tf("tabstat_output") * However, lablogger will require the .tex suffix: lablogger table using "tabstat_output.tex"
Outputting lists
The LaTeX equivalent of the list command:
- listtex
list make weight mpg if foreign * You can use the prefix notation here: lablogger table, caption("List output"): listtex make weight mpg if foreign using "listtex_output.tex", rstyle(tabular) head("\begin{tabular}{rrr}" `"\textit{Make}&\textit{Weight (lbs)}&\textit{Mileage (mpg)}\\"') foot("\end{tabular}") replace
Outputting regression output
- outtex
- estout (which includes the esttab command)
- outreg
- outreg2
Installing packages
Generally speaking, you can install these commands by using the findit command, e.g.
findit estout
Often faster is using the SSC, also known as the Boston College Archive:
ssc install estout
Updating packaging can be done through the adoupdate command:
adoupdate