I am interested in the summary statistics (specifically, the number of observations and mean) of a loop including a number of levels. Currently I have:
Code:
sysuse auto.dta
levelsof make
foreach lev in `r(levels)' {
di "`lev'"
sum price if make == "`lev'"
}
Can anyone help me on this? Thank you in advance.
Kind regards,
Eline
0 Response to Export Summary Statistics of a Loop to Word File
Post a Comment