I am building a simple summary table of multiple categorical variables with the new commands table and collect. I would like to add rows with bold text to my table to differentiate between my IVs, DVs and Moderators. In the example below, I would like to add one row above my variable "Industry" and one row above my variable "Occupation". Above "Industry" I would like to add bold text "DV", above "occupation" I would like to add "IV". It could be in the same column (indented or not), or in new column left to the variable column.
Code:
use https://www.stata-press.com/data/r17/nlsw88.dta table, stat(fvfrequency industry) statistic(fvpercent industry) stat(fvfrequency occupation) statistic(fvpercent occupation) collect layout (var) (result) collect label levels result fvfrequency "Freq." fvpercent "Percent", modify collect style row stack, nobinder collect export sample.description2.docx, as(docx) replace
Comment