I'll make a guess. -collapse- can never be
faster than customised code that focuses
on exactly what you want to do, as typically
you are replacing a few hundred lines of
Stata with a few.
Nick
[email protected]
Chris Ruebeck
> When we generate bootstrapped standard errors and perform Monte Carlo
> analyses, it's useful to make the code as speedy as possible. So I
> thought about -collapse- for a moment and performed the
> following speed
> test listed below. The timing results follow it, showing that my
> homebrewed version was twice as fast as -collapse-.
>
> I'm not surprised at this result---collapse bears lots of
> overhead---but I'm wondering if there any general rules to indicate
> when -collapse- might be faster, if ever. I do value
> debugging time if
> -collapse- shortens it for me, but in this case upfront
> debugging time
> would seem to be small compared to the total time spent actually
> running the bootstrap or Monte Carlo.
>
*
* 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/