Say that I have this dataset:
webuse union, clear
I want to run a tabulation:
tab union smsa
I want to export it to a .tex file and have it look similar to the above tabulation. Is there a way to have code similar to the following display the labels (union worker
and lives in SMSA
) automatically instead of having to hard code them in?
eststo clear
eststo: estpost tab union smsa
esttab est1 using "${path}/example.tex", cell(b) unstack noobs ///
replace nonum collabels(none) eqlabels(, lhs("union worker")) ///
mtitles("lives in SMSA")
sysuse auto
towebuse union
. – Nick Cox