Dear Professor Attaullah,
I am working on a loop and trying to print the summary statistics to Words document, but the table does not include the variable names.
Also, can you please instruct me on how to include “bys year” command into the loop using asdocx?
Thank you so much
My command is:
loc NextRow 2
flexmat reset
flexmat addrow, data (Variable, Obs, Mean, Std.Dev., Max, Min) row(1)
foreach var in twear tnonwear move comm mon oth {
sum nrobot_`var'
flexmat addrow, data (`r(N)',`r(mean)', `r(sd)',`r(max)', `r(min)') row(`NextRow') dec(3)
loc ++NextRow
}
asdocx export