Stata: Export OLS regression table to Word or Excel

Wednesday, May 27, 2009

Stata is a statistics software package with many neat modules that can help you to reduce your workload. One of my favorite modules is estout, which allows the export of your regression tables directly from Stata to Word documents or Excel. Isn’t that cool?

Website:http://repec.org/bocode/e/estout/installation.html

1. First, install this great module by typing the following command in Stata:
ssc install estout, replace

2. Run one OLS regression (the program can export many regression tables, but for now, we will limit ourselves to one).

1.png

3. When you are done, type the following:

esttab using test.rtf

4. You can find this file in my document\stata folder. It appears ike this:
2.png
5. If you are using have hierarchical regression/ nested regression, things can become a bit complicated. You have to store it by typing est store m1 after running your first regression. It would be look like this:

regress y x1 x2
est store m1
regress y x1 x2 x3 x4
est store m2
regress y x1 x2 x3 x4 x5 x6
est store m3
esttab * using test.rtf, replace 



6. The export file would appear like this:

3.png

7. If you would prefer the output to be in Excel format, you can use test.csv.

Endnote: import BibTex format

Friday, May 22, 2009

Endnote does not have an import filter for Bibtex format. However, Zotero or Jabref can be used to convert your bibliography. If you would prefer not to install additional programs on your computer, you could also try a tool here: http://www.it.usyd.edu.au/~tapted/bib2endnote.html This tool is capable of converting Endnote generated xml format from Bibtex. We have provided a syntax Bibtex file with which to practice: http://people.umass.edu/kbj/homepage/index_johnson.htm

Download bib2endnote.jar from the first website mentioned above. Ensure that you have Java Virtual Machine installed, run this tool, and open your bib file.

1.png

Be patient. It may require several minutes before you see the file in xml format in the right panel. Remember to save it.

2.png 

Run Endnote and begin the import.

3.png

Select your xml file, and remember to choose Endnote generated XML format under import option.

4.png