Hi all,
I am doing an event study with 800 different stocks and using the Princeton event study code (https://dss.princeton.edu/online_hel...ventstudy.html).
At the time I use 'forval' the loop always stops after stock 11. Even if I remove the stock in question from the data (just to see what the problem is).
my code:
forval i=1/800{
reg Ret MktRF SMB HML if Estimation_window1==1 & Id==`i'
predict p if Id==`i'
replace Normalreturn = p if Id==`i'
drop p
}
Does anyone have a solution to make the loop continue even after the eleventh stock?
I like to hear from you!
I am doing an event study with 800 different stocks and using the Princeton event study code (https://dss.princeton.edu/online_hel...ventstudy.html).
At the time I use 'forval' the loop always stops after stock 11. Even if I remove the stock in question from the data (just to see what the problem is).
my code:
forval i=1/800{
reg Ret MktRF SMB HML if Estimation_window1==1 & Id==`i'
predict p if Id==`i'
replace Normalreturn = p if Id==`i'
drop p
}
Does anyone have a solution to make the loop continue even after the eleventh stock?
I like to hear from you!
Comment