gen predicted_return=.
(29481 missing values generated)
. egen id=group(company_id)
. qui tabulate id
. local N = r(r)
. forvalues i=1(1)‘N’ {
2. qui reg ri rm if (id==‘i’ & estimation_window==1)
3. predict p if id==‘i’
4. replace predicted_return = p if (id==‘i’ & event_window==1)
5. drop p
6. }
invalid syntax
r(198);