Announcement

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

  • Table command- Suppress or Relabel command line headers?

    The new table command is really powerful, but if you are using the command option, it prints the whole command line at the top. I'd really like to either suppress the command lines or relabel them as "Unadjusted" and "Adjusted", which would shorten up that table a lot.

    Also, there seems to be a way to format the confidence interval better than just labeling every column, but as usual, the documentation is a little cryptic.

    Click image for larger version

Name:	Screenshot 2022-11-23 082309.png
Views:	1
Size:	206.6 KB
ID:	1690681



    Thanks

    Paul






  • #2
    Code:
    webuse nhanes2, clear
    . table colname, command(regress bpsystol age bmi) command(regress bpsystol age)
    ------------------------------------------------------------------------
                          |  regress bpsystol age bmi   regress bpsystol age
    ----------------------+-------------------------------------------------
    Age (years)           |                  .5883367               .6520775
    Body mass index (BMI) |                  1.304128                       
    Intercept             |                  69.58451               99.85603
    ------------------------------------------------------------------------
    
    collect label levels command 1 "Adjusted" 2 "Unadjusted", modify
    collect layout (colname) (command#result)
    . collect preview
    ----------------------------------------------
                          |  Adjusted   Unadjusted
    ----------------------+-----------------------
    Age (years)           |  .5883367     .6520775
    Body mass index (BMI) |  1.304128             
    Intercept             |  69.58451     99.85603
    ----------------------------------------------

    Comment

    Working...
    X