Tools for exporting from Stata to LaTex

Manually exporting descriptive statistics or estimation results from statistical software to a document can be tedious and error prone. Furthermore, if new results are included or there are changes in the methodology or database, this tedious process has to be repeated.

This problem can be solved by having a tighter integration of the source programs and the document. An example of this integration would be R and LaTex. However, having Stata and LaTex code in the same document does not seem feasible to me; therefore, the solution is exporting Stata results directly to LaTex files using some of the available Stata modules.

Here you have a list of Stata modules that might help you to export your results from Stata to LaTex:
ESTOUT: Stata module to make regression tables
OUTTABLE: Stata module to write matrix to LaTeX table
CORRTEX: Stata module to generate correlation tables formatted in LaTeX
EST2TEX: Stata module to create LaTeX tables from estimation results

Do you know other modules? Which has been your experience with them?
I look forward to reading your comments.
|

An alternative program for Fama-Macbeth regressions

Daniel Hoechle has also written an implementation of the Fama and MacBeth estimation procedure for Stata, available at SSC. I think it is easier to install than my implementation and works better (especially with post estimation commands). I recommend it unless you need Newey-West correction, in this case you can use my programs.
|

Fama-MacBeth regressions with Newey-West standard errors

I have written two Stata programs to estimate Fama-MacBeth regressions with Newey-West standard errors.
The first works similarly to the Stata regress command and the second similarly to the Stata ivreg command; you can download them from here.

The syntax is simple:
fmregress or fmivreg followed by the model as if you were calling regress or ivreg.
The options are:
NOCONStant: If you don't want a constant in your regressions
LAG(integer): The lags to be used by Newey-West correction. It is 0 by default.
DROPFirst(integer): The number of initial dates that you want to drop (useful if you use lagged variables as regressors). It is 0 by default.

They are provided as they are, that is, without any kind of support. If you use them you agree in doing it at your own risk. However, any feedback or improvements will be very appreciated.
Please, drop me a line if you find them useful or have any comment, suggestion, or improvement.
|

More about estout

In the previous post I have mentioned estout, which is, from my point of view, the best and more flexible way to export regression results from Stata to Latex. This time I have a hint for you: if you want to change the order in which the independent variables appear, you can use the keep() option.

Keep consulting this blog or subscribe to it, soon I will show how with LaTex and a small script you can have a version of your cv in different languages without going crazy. My cv, in three languages, is maintained using these tools. This is specially useful if you live in a non English speaking country.
|

Regression results from Stata to LaTex

Until now, I have been using outreg to extract regression results from Stata to Excel. Then I have used a tool to convert from Excel to LaTex. It works, but it is a bit messy given that not all the process is automatic.
I have found what I think is a much better tool: estout. You can learn how to use estout here.
|