Dear Statalisteners,
I want to make a descriptive table using -esttab- (from SSC), broken down by subgroups, like this:
This gives me a table like this:
This is great, but I am unhappy with the bottom line giving the N. I know that I can suppress it with
But what I would rather have is a bottom line that gives me the N of the groups, kind of like this
Is there a way to achieve that?
Many thanks for your consideration
Go
I want to make a descriptive table using -esttab- (from SSC), broken down by subgroups, like this:
Code:
sysuse auto, clear estpost tabstat trunk weight length, by(foreign) statistics(mean sd) columns(statistics) esttab, cells(mean(fmt(2)) sd(fmt(2) par)) unstack nomtitle nonumbers
Code:
---------------------------------------------------
Domestic Foreign Total
mean/sd mean/sd mean/sd
---------------------------------------------------
trunk 14.75 11.41 13.76
(4.31) (3.22) (4.28)
weight 3317.12 2315.91 3019.46
(695.36) (433.00) (777.19)
length 196.13 168.55 187.93
(20.05) (13.68) (22.27)
---------------------------------------------------
N 74
---------------------------------------------------
Code:
esttab, cells(mean(fmt(2)) sd(fmt(2) par)) unstack nomtitle nonumbers noobs
Code:
---------------------------------------------------
Domestic Foreign Total
mean/sd mean/sd mean/sd
---------------------------------------------------
trunk 14.75 11.41 13.76
(4.31) (3.22) (4.28)
weight 3317.12 2315.91 3019.46
(695.36) (433.00) (777.19)
length 196.13 168.55 187.93
(20.05) (13.68) (22.27)
---------------------------------------------------
N 52 22 74
---------------------------------------------------
Many thanks for your consideration
Go

Comment