Announcement

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

  • Generating a Correlation Matrix Including Summary Statistics

    Dear all,

    I would like to generate and output a correlation matrix that includes the summary statistics (i.e., means, standard deviation, min, and max) of the variables in the same table.

    I am using asdoc and corr in Stata 17.0. So far, I have tried:
    Code:
    asdoc corr [varlist], means
    Although the Word document output includes the correlation matrix, it does not include the summary statistics in a single table as expected.

    Also, I would like to reduce the width of the variables so that the table does not come out too wide.

    Can anyone help me figure out how to do this?

    Thank you very much in advance
    Best regards,

  • #2
    There is an illustration in the linked thread on how you can do it using estout from SSC. For reducing width, there are several options available within Word itself, e.g., fitting the table contents to page. However, sometimes the table is just too wide. Changing the page orientation to landscape may make sense in such instances. Benn Jann shows how you can do this directly in estout at https://www.statalist.org/forums/for...landscape-view.

    See https://www.statalist.org/forums/for...relation-table

    Code:
    ssc install estout, replace

    Comment


    • #3
      Thank you very much, Andrew. This was helpful.

      Comment

      Working...
      X