Hi, everyone.
I am trying to make some small changes to a table that relies on -collect- syntax and having some trouble coming up with a workable approach after reading the manual.
Specifically, I want to remove some of the level labels, and add subtitles to columns reflecting that they refer to N and percentages.
Here is the code I'm using to generate the table.
And here is a redlined version of what I would like the table to look like.

Thanks for any suggestions!
I am trying to make some small changes to a table that relies on -collect- syntax and having some trouble coming up with a workable approach after reading the manual.
Specifically, I want to remove some of the level labels, and add subtitles to columns reflecting that they refer to N and percentages.
Here is the code I'm using to generate the table.
Code:
sysuse cancer.dta gen ageGroup=age>59 label define ageGroup 0 "Under 60" 1 "60 and older" label values ageGroup ageGroup table (var) (died), /// statistic(fvfrequency drug) statistic(fvpercent drug) /// statistic(fvfrequency ageGroup) statistic(fvpercent ageGroup) collect style header result, level(hide) collect style row stack, nobinder spacer collect layout (var) (died[0 1 total]#result) collect preview
And here is a redlined version of what I would like the table to look like.
Thanks for any suggestions!
Comment