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
Plotting Matrix as pdf with two values in each cell and coloring with respect to both valuesHello, I'm trying to plot a matrix as a pdf file. There are two things in particular I would like t…
regression by industry and yearHi members, I am trying to run a regression by industry and year. I used the following code but I g…
Robust standard errors for Panel Count DataHi Statalisters, I have panel count data and it appears to me that it has rather a negative binomia…
Adding values in estpost/esttabHi, i'm using estpost and esttab to export variables summarizes. I would like to get Count/750 for e…
Using strpos to generate a new variable conditional on the last digit of another stringDear Statalisters, I'm struggling with Stata in handling a string problem. I have a dataset of indu…
Subscribe to:
Post Comments (Atom)
0 Response to no observations r(2000) error after some observations, event study princeton
Post a Comment