Announcement

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

  • Table Descriptive statistics by group

    Dear all

    I am trying to create and export a summary statistics table by using the --tabstat- and -estout- commands.

    Code:
    estpost tabstat  sdresidual1 sdresidual2 size loss mb roa lev rev_sd salesgr inv_at cfom1 cfop1 cfo ppeg dsal if e(sample), stats(N mean sd p25 p50 p75) columns(statistics)
    esttab using descr_stats.csv, replace cells("N mean(fmt(3)) sd(fmt(3)) p25(fmt(3)) p50(fmt(3)) p75(fmt(3)) ") label
    Below the output (after doing some manual adjustements)

    Click image for larger version

Name:	Table_1.png
Views:	1
Size:	37.4 KB
ID:	1651344


    Now I'm trying to create the same table by group. Where my variables that divide the group is -treated- (that identifies treated and control group) .

    The final results that I would like to have is like the sample as follow (below they don't display Q1 Median and Q3, in my case I would still try to keep it).

    Any tips?

    Click image for larger version

Name:	Table 2.png
Views:	1
Size:	7.8 KB
ID:	1651345



Working...
X