Announcement

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

  • Summary statistics

    Hi,
    I would like to do summary statistics (mean, max min, number of observations) for a number of variables. I need to do it year by year, since my data is constructed as panel data, and export it to a word format. Either by using estout or outreg2. Anybody knows how I can do this?

  • #2
    estout is from SSC, as you are asked to explain (FAQ Advice #12).

    Code:
    webuse grunfeld, clear
    keep if inrange(year, 1948, 1950)
    forval year= 1948/1950{
        estpost sum invest mvalue kstock if year==`year'
        local opt= cond(`year'==1948, "replace", "append")    
        esttab . using myfile.rtf, `opt' cells("count(fmt(a2)) mean(fmt(a2)) max(fmt(a2)) min(fmt(a2))") ///
        title("Sample year: `year'") nonumbers collabels(N Mean Max Min) noobs mlab(none)
    }
    Res.:
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	25.1 KB
ID:	1743241

    Comment


    • #3
      Thank you! It worked perfectly.

      Best
      David

      Comment

      Working...
      X