Good day guys,
The first loop runs fine, which stores the e(rmse), however, the second loop gives me the error "if not found". Can someone please assist?
Thank you
The first loop runs fine, which stores the e(rmse), however, the second loop gives me the error "if not found". Can someone please assist?
Thank you
Code:
forvalues i=1(1)130 { l id company_id if id==`i' & dif==0 reg ret market_return if id==`i' & estimation_window==1 local rmse_id_`i' = `e(rmse)' predict p if id==`i' replace predicted_return = p if id==`i' & event_window==1 drop p }
Code:
gen t_value = . forvalues i = 1/130 { replace t_value = abnormal_return2/`rmse_id_`i'' if id == `i' & event_window == 1 }
Comment