Announcement

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

  • How can I get several variables' mean values at the smae

    I want to create a vector containing several variables' mean values. But the summarize command only return the last variables' mean value stored in r(mean).

    Although I can make it by repeating the summarize command, I just want to ask if there is any command can return a list of variables' mean values?

  • #2
    Code:
    sysuse auto, clear
    
    mean price mpg headroom
    
    matrix Means = e(b)
    
    matrix list Means

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      Code:
      sysuse auto, clear
      
      mean price mpg headroom
      
      matrix Means = e(b)
      
      matrix list Means
      Dear Clyde, Thanks for your information! It is totally what I need.

      Comment


      • #4
        Cross-posted with a different answer at https://stackoverflow.com/questions/...ables-in-stata

        Please note our policy on cross-posting, which is that you are asked to tell us about it.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          Cross-posted with a different answer at https://stackoverflow.com/questions/...ables-in-stata

          Please note our policy on cross-posting, which is that you are asked to tell us about it.
          I'll post it next time. Thanks for you mention.

          Comment

          Working...
          X