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
Compare proportions with survey weightsHi, I used the following command to generate the output given below. Code: svy: tabulate Recoded c_…
How to tag Father and Son in a dataset using Household identifierDear Stata community I want to tag father and son in every household. The dataset has HHID (househo…
Calculating some formula in stataDear Stata community, I hope you are all doing well. I've cleaned all my data using Stata and then…
GwasInverse normal transformation of a quantitative trait seems to be very common in GWAS, however I am …
which nested regression syntax is most appropriate please?Hi there, I wish to run a nested regression to see the relationship between IVs (deprivation, gmfcs…
Subscribe to:
Post Comments (Atom)
0 Response to no observations r(2000) error after some observations, event study princeton
Post a Comment