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
Pooled OLS with interaction on almost all explanatory variablesDear Statalist, I have panel data covering 763 firms over 15 years, taken from an industry consorti…
Question about Generalized DIDHi everyone, I have a research project trying to investigate the impact of a policy shock, and the …
predictnl and factor variablesDear All, suppose I have the following: Code: logit Y X1 X2 X3 i.COUNTRY i.YEAR, cluster(S003) Af…
Building Index based on dummy and ordered multinomial variablesDear Stata users, I am working on the replication of a poverty index based on 34 socieconomic varia…
Creating an indexHello, I would like to create an index with several variables (high-tech exports in US$, no. of tech…
Subscribe to:
Post Comments (Atom)
0 Response to no observations r(2000) error after some observations, event study princeton
Post a Comment