How can I generate output in Word for correlation tables in Stata?

14,759

Solution 1

You can do this with estout/esttab/estpost after installing it:

capture ssc install estout 
sysuse auto
estpost correlate price mpg weight 
esttab using corr.rtf

This is pretty basic looking, but you can make it a lot more fancy after looking at some examples here.

Solution 2

Two things:

First, the help file of mkcorr says that you can produce the output in Word:

"mkcorr produces a correlation table in a format that is easy to import into a spreadsheet or word processing document"

Second, mkcorr does what you want. It includes means, standard deviation, correlation and significance label (and also minimum and maximum).

Here is an example:

sysuse auto 
mkcorr price mpg, log(C:\Users\Vista\Desktop\auto.doc) replace means sig cdec(2) mdec(2)

However, the output in Word needs some manipulation compared with that in Excel.

Share:
14,759
Admin
Author by

Admin

Updated on July 22, 2022

Comments

  • Admin
    Admin almost 2 years

    I want to generate an output for my correlation table so I can use it in Word. The only command I found is mkcorr, which only generates an output I can copy in Excel, but not in Word. I need a correlation table in Paper style ( with means, standard deviation, correlation and significance label).