Dear members,
i would be happy if you can help me. I conduct event study. Variables: group_id is = group(company_id set); id is =group(company_id); ret is stock price of company, market_return is index
(DAX30), estimation window is =1 if dif<-30 & dif>=-60, event date=1 if dif>=-2 & dif<=2; dif is Differenz between date and event_date. And I write:
forvalues i=1(1)N {
2. l id company_id if id==`i' & dif==0
3. reg ret market_return if id==`i' & estimation_window==1
4. predict p if id==`i'
5. replace predicted_return = p if id==`i' & event_window==1
6. drop p
7. }
STATA returns :"invalid syntax r(198);
Why? What is incorrect?
i would be happy if you can help me. I conduct event study. Variables: group_id is = group(company_id set); id is =group(company_id); ret is stock price of company, market_return is index
(DAX30), estimation window is =1 if dif<-30 & dif>=-60, event date=1 if dif>=-2 & dif<=2; dif is Differenz between date and event_date. And I write:
forvalues i=1(1)N {
2. l id company_id if id==`i' & dif==0
3. reg ret market_return if id==`i' & estimation_window==1
4. predict p if id==`i'
5. replace predicted_return = p if id==`i' & event_window==1
6. drop p
7. }
STATA returns :"invalid syntax r(198);
Why? What is incorrect?
Comment