Hi everyone,
I am running event study using princeton example https://dss.princeton.edu/online_hel...ventstudy.html
Everything runs correctly until the command below.
What stata does is run the regressions for 535 companies and then the error message pops up no observations r(2000). Thus I miss regression for rest 278 companies. (In total 813 companies in my event study)
Could you help me solve this issue?
gen predicted_return=.
egen id=group(company_id)
forvalues i=1(1)813 {
l id company_id if id==`i' & dif==0
reg ret_price ret_index if id==`i' & estimation_window==1
predict p if id==`i'
replace predicted_return = p if id==`i' & event_window==1
drop p
}
Thanks!
Ola
Related Posts with no observations r(2000) error after some observations, event study princeton
Non-linear graphs comparisonGood morning or evening, dear community, I have a struggle with how to better approach a comparison …
chow test for mixed modelsHi, I have a question about the chow test for comparing coefficients in mixed models. On this Stat…
multiple fixed effect wiith areghi. a run this code, but i faced with an error. please help me. xi: areg inv RE_value index_state yr…
Apprpriate to use a log for my dependent variableWould it be appropriate to take the log of hourly benefits? Some observations are 0 so it deleted th…
Reghdfe HelpHi guys, i'm trying to run a muilti-fixed effects regression using reghdfe when i type my code: reg…
Subscribe to:
Post Comments (Atom)
0 Response to no observations r(2000) error after some observations, event study princeton
Post a Comment