Nian,
Did you also try to use -statsby- , then merge the coefficient
estimates to your existing dataset and compute the predicted values by
yourself? I think this should be much faster and easier to implement
than the "in" solution.
Best,
Ingo
On 3/15/07, Nian Huang <[email protected]> wrote:
I want to thank everybody for their previous quick responses.
Here is my piece of code for event study. Basically, I get it from the
Stata sample program.
forvalues i=1(1)1314 {
quietly reg ret mkt if id==`i' & est_window==1
quietly predict p if id==`i'
quietly replace pred_rtn= p if id==`i' & event_window==1
quietly drop p
}
The above program took 30 minutes to run through. Is there any way to
improve it?
Appreciate your input!
*
* 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/
*
* 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/