The data I have is protected, but I can simulate the problem with the nlswork dataset.
Code:
cls webuse nlswork, clear keep if year==77 | year==78 gen sampleclustervar=1 if idcode<2696 replace sampleclustervar=2 if idcode>2696 & idcode<6000 xtset id year xtreg ln_wage age tenure hours union, fe vce(bootstrap, reps(1000)) cluster(sampleclustervar) // This line works fine xtivreg ln_wage age tenure hours (union= south), fe vce(bootstrap, reps(1000)) cluster(sampleclustervar) // This line does not work
According to what I'm seeing in the help file, this should work, I think. But instead I get:
Code:
option cluster() not allowed an error occurred when bootstrap executed xtivreg
(Note: I apologize for posting this twice. I didn't post the right tags on this earlier and now I can't seem to delete my original or edit it to put the tags on. The original was here: https://www.statalist.org/forums/for...ors-by-cluster)
0 Response to Fixed effects models with instrumental variables and bootstrapped standard errors within clusters
Post a Comment