Announcement

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

  • Summary Statistics per Period

    I'm using panel data so have data for several periods, named 1, 2, 3, 4 and 5. I was wondering if there was a way to generate the summary statistics (Obs, Mean, SDV, Min, Max) for each period?
    By default the 'summarize' function just returns the results for the periods combined, I believe.

    Thanks for your help.

  • #2
    Code:
    by period, sort: summarize
    Please note that it is the norm in this community to use our real first and last names as our username, to promote collegiality and professionalism. The Forum software does not enable you to change the username in your profile, but you can click on Contact Us (lower right corner of the page) and message the system administrator requesting that he do it for you. Thank you.

    Comment


    • #3
      I agree strongly with Clyde Schechter

      Our request to use real names is documented at https://www.statalist.org/forums/help#realnames and also at https://www.statalist.org/forums/help#adviceextras -- which everyone is prompted to read before posting.

      Although as Clyde suggested the summarize command (it's not a function; in Stata function is not a synonym for command) can be used in this way, the output can be a little awkward and something like

      Code:
      tabstat foo, by(period) s(n mean sd min max)
      is an alternative.

      Comment

      Working...
      X