I've successfully generate a set of descriptive tables for six variables, and I can manually stack them on top of each other, but would like to know if there's a way to automate this. This is what my code currently looks like:
ageG22 genderC raceD and so on are the variables being tabulated. Ideally, the column total would be eliminated from each tabulation, and I would get one long table with value label on the left and the proportion on the right.
Thanks
Chris
Code:
. eststo clear . eststo: quietly estpost svy: tabulate ageG22 if Md1sample==1 . esttab, cell("b(f(4))") varlabels(`e(labels)') varwidth(16) . eststo: quietly estpost svy: tabulate genderC if Md1sample==1 . esttab, cell("b(f(4))") varlabels(`e(labels)') varwidth(16) . quietly estpost svy: tabulate raceD if Md1sample==1 . esttab, cell("b(f(4))") varlabels(`e(labels)') varwidth(16) . quietly estpost svy: tabulate relcat if Md1sample==1 . esttab, cell("b(f(4))") varlabels(`e(labels)') varwidth(16) . quietly estpost svy: tabulate educ_par1 if Md1sample==1 . esttab, cell("b(f(4))") varlabels(`e(labels)') varwidth(25) . quietly estpost svy: tabulate educ_par1 if Md1sample==1 . esttab, cell("b(f(4))") varlabels(`e(labels)') varwidth(25)
Thanks
Chris
Comment