Announcement

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

  • -esttab matrix-: How to remove matrix name from table?

    Hi

    Using esttab (SSC), I want to display a matrix:

    Code:
    sysuse auto, clear
    correlate price mpg headroom, cov
    matrix C = r(C)
    esttab matrix(C)
    This yields this table:

    Code:
    ---------------------------------------------------
                            C                          
                        price          mpg     headroom
    ---------------------------------------------------
    price             8699526    -7996.283     285.7209
    mpg             -7996.283     33.47205    -2.025361
    headroom         285.7209    -2.025361     .7157071
    ---------------------------------------------------
    How do I get esttab to not display the C on top of the table?

    Many thanks
    KS

  • #2
    Found by trail and error, guided by thinking about what Stata might be equating a matrix to.
    Code:
    . esttab matrix(C), nomtitles
    
    ---------------------------------------------------
                        price          mpg     headroom
    ---------------------------------------------------
    price             8699526    -7996.283     285.7209
    mpg             -7996.283     33.47205    -2.025361
    headroom         285.7209    -2.025361     .7157071
    ---------------------------------------------------
    
    . esttab matrix(C), mtitles("Hello, world")
    
    ---------------------------------------------------
                 Hello, world                          
                        price          mpg     headroom
    ---------------------------------------------------
    price             8699526    -7996.283     285.7209
    mpg             -7996.283     33.47205    -2.025361
    headroom         285.7209    -2.025361     .7157071
    ---------------------------------------------------

    Comment


    • #3
      Thanks so much, I was almost certain that I had tried that one!

      KS

      Comment

      Working...
      X