Announcement

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

  • Command to display without generating

    Dear Stata users,

    Suppose I want to know the result of the sum of a variable X, in Stata I can use egen command
    Code:
    egen wanted =  total(X)
    My question: Is there a command can display directly the result that I wanted, and without generating a new variable? For example:
    Code:
    display [(or any available command) (wanted = )] total(X)
    Thank you very much.

  • #2
    Code:
    summarize X, meanonly
    display `r(sum)'

    Comment


    • #3
      Clyde Schechter professor, thank you so much!

      Comment

      Working...
      X