Jump to content

Stata/Publication Quality Ouput

From Wikibooks, open books for an open world


Weaving

[edit | edit source]

Weaving is an integration of statistical program with a publishing software. You have in the same file your code and your text. Weaving is intended to improve reproducibility standards (see Roger Koenker's webpage).

Export to LaTeX

[edit | edit source]
  • eststo, esttab, estadd and estout are the best solution to print and export to latex the estimation results[1].
    • eststo is a prefix command which stores estimation results.
    • estout prints the results. It includes many options and is difficult to use.
    • esttab is a wrapper for estout which includes less options and is easier to use.
    • estadd allows to store more statistics.
sysuse auto, clear
eststo clear
eststo A: quietly logit foreign weight
eststo B: quietly logit foreign weight mpg 
estadd lrtest A
esttab, scalars(lrtest_chi2 lrtest_df lrtest_p)
eststo clear
clear
set obs 100

gen u = invnorm(uniform())
gen x1 = invnorm(uniform())
gen x2 = invnorm(uniform())
gen y = 1 + x1 + x2 + u

qui : reg y x1
modl 1 ,Base model
qui : reg y x1 x2
modl 2 ,Full model
modltbl se 1 2 

Export to a spreadsheet (Excel)

[edit | edit source]
  • outreg
  • outsheet

Export to a text format

[edit | edit source]
  • outsheet

References

[edit | edit source]


Previous: Natural Language Processing Index