Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • export correlationmatrix from stata to excel

    Hello everybody,

    I created a correlationmatrix with the following code:

    pwcorr roa roe size industry, star(0.1)


    Is there a code to convert the matrix into excel where I can still edit it and all rows and columns are in the right position ?

    Thanks in advance.
    Thomas

  • #2
    pwcorr leaves the resulting matrix behind in r(C), albeit without significance stars. You could export this matrix using putexcel.

    For example, see https://www.stata.com/stata-news/new...20Excel%20file.

    Comment


    • #3
      Thanks for your help.

      Comment


      • #4
        asdoc can export the the correlation table with stars to MS Word (and asdocx can export to Word, Excel or LaTeX). Here is one example:
        Code:
        ssc install asdoc
        sysuse auto, clear 
        asdoc pwcorr, star(all) replace
        Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	89.7 KB
ID:	1581227
        Regards
        --------------------------------------------------
        Attaullah Shah, PhD.
        Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
        FinTechProfessor.com
        https://asdocx.com
        Check out my asdoc program, which sends outputs to MS Word.
        For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

        Comment

        Working...
        X