Dear all,
I am trying to figure out dtable layout outputs so I do not have to fidget as much in word anymore.
Right now, I want to get the mean and median of some variables by a dummy variable. E.g.:
However, while this code gives the exact output I want, the layout is a bit weird. That is, the mean and median values are put in the same cell of the table. I would like to have a subheader for the mean and the median underneath the domestic/foreign labels, a bit like this example: 
I tried something like:
But this gives just the median values.
Is there some way to achieve what I want within the dtable options or should I use some other table/summary command?
Kind regards,
Johannes de Ruig
I am trying to figure out dtable layout outputs so I do not have to fidget as much in word anymore.
Right now, I want to get the mean and median of some variables by a dummy variable. E.g.:
Code:
sysuse auto.dta dtable, by(foreign, nototals) column( by(label, fvlabel) ) nosample continuous(mpg headroom weight length, statistics(mean median))
I tried something like:
Code:
dtable, by(foreign, nototals) column( by(label, fvlabel) ) nosample continuous(mpg headroom weight length, statistics(mean)) continuous(mpg headroom weight length, statistics(median))
Is there some way to achieve what I want within the dtable options or should I use some other table/summary command?
Kind regards,
Johannes de Ruig
Comment