Hello all,
I am working on a project regarding house prices, aggregated by grids and quarter, and I am trying to implement an event-study.
I am following the guidelines from Princeton, https://dss.princeton.edu/online_hel...ventstudy.html, and wrote the following command:
gen predicted_price=.
egen id=group(nid)
forvalues i=1(1)3469{
l id nid if id==`i' & var1==0
reghdfe norm_price x1 x2 x3 if id==`i' & estimation_window==1, a(nid quarter) vce(cluster nid quarter)
predict p if id==`i'
replace predicted_price = p if id==`i' & event_window==1
drop p
}
When I run it, I get the error r(2001) "insufficient observations". This is very puzzling as I have a very large dateset.
I then tried:
gen predicted_price=.
egen id=group(nid)
forvalues i=1(1)3469{
l id nid if id==`i' & var1==0
capture reghdfe norm_price x1 x2 x3 if id==`i' & estimation_window==1, a(nid quarter) vce(cluster nid quarter)
predict p if id==`i'
replace predicted_price = p if id==`i' & event_window==1
drop p
}
and got the error r(301) 'last estimates not found'.
If anyone could help me, I would greatly appreciate.
Thank you!
Related Posts with error r(2001) - insufficient observations
ANOVA REPEATE MEASURES - HOW TO INTERPRET CONTRADICTORY RESULTS BETWEEN ANOVA AND MULTIPLE PAIRWISE COMPARISONS (post hoc)?Good mornig to everybody. 1)HOW TO INTERPRET CONTRADICTORY RESULTS BETWEEN ANOVA AND MULTIPLE PAIRW…
Heteroskedasticity or other problem with regression?Hello everyone, so I run a pooled OLS regression on panel data of log real monthly wage on education…
Xtreg with Demeaned variablesI have a panel dateset and my dependent variable and independent variables are demeaned and standard…
Sum of values of a conditional variableI am new to using Stata, I have always made corrections using already clean bases. I have the variab…
Performing chi squared with one variable against a group of variables individuallyI've done a ton of looking around, and I've likely just not got the right key words, but my goal is …
Subscribe to:
Post Comments (Atom)
0 Response to error r(2001) - insufficient observations
Post a Comment