I'm optimizing some code that needs to run often
for a simulation, and am wondering if I should
expect any difference in processing time between
bys group: egen varmean=mean(myvar)
bys group: keep if _n==1
keep group varmean
and
collapse (mean) varmean=myvar, by(group)
and if so, which would be faster?
I know I could run some tests myself, but figured
that others had either already done so or at least
would have some insight.
thanks in advance,
Jeph
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/