--- Nian Huang wrote:
> My version is Intercool Stata.
The really important information is the version number (if you don't say
it is assumed that you are using the latest greatest version (now 9.2).
> In Stata, for each event, a simple linear regression will be estimated
> around the estimation window. Then based on the fitted line, residuals
> will be calculated for the 3-day event window. Since I have around
> 1,300 events, Stata will do the same routine around 1,300 times.
>
> I ran the program several times, and everytime it would take more than
> 30 minutes to finish the task.
> I asked some of my colleagues--unfortunately, they use SAS instead of
> Stata, and they said for the task, it only takes around several
> seconds in SAS.
This to me suggests that SAS uses a trick so it doesn't have to estimate
all 1,300 regressions, for instance by calculation the regression for only
a subset and interpolating for the other events. (I know nothing about
event studies, but it sounds to me similar to loess, and this is a trick
that is sometimes used for loes, though not by Stata)
> I want to know whether any Stata users have the similar situation
> while running a event study program.
> Is there any way to improve the program's efficiency?
If you don't tell us exactly what you typed, it is hard to make
concrete suggestions (with efficiency of code, the devil is often in
the detail)
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/