Hi, my current object is to run a IV regression with fixed effects and clustered standard errors at firm level, and to have the bootstrapped standard errors from 100 repetitions for hypothesis testing.
But I have errors occur when running commands as below:
Errors occur like
And I have also tried similar commands like:
But it seems that `xtivreg` does not have the `cluster` option.
I have already checked for any duplicated observations, and things go well when I run without IV before:
I wonder whether there will be other ways to do such regression with established commands, thank you!
But I have errors occur when running commands as below:
Code:
xtset gvkey fyear bootstrap, reps(100) cluster(gvkey): xtivreg y (x1 x2 x3 x4 = z1 z2 z3 z4) w1 w2 w3 w4 w5, fe vce(cluster gvkey)
Bootstrap replications (100): repeated time values within panel
the most likely cause for this error is misspecifying the cluster(), idcluster(), or group() option
r(451);
the most likely cause for this error is misspecifying the cluster(), idcluster(), or group() option
r(451);
Code:
xtivreg y (x1 x2 x3 x4 = z1 z2 z3 z4) w1 w2 w3 w4 w5, fe vce(bootstrap, reps(100)) cluster(gvkey)
I have already checked for any duplicated observations, and things go well when I run without IV before:
Code:
xtreg y x1 x2 x3 x4 w1 w2 w3 w4 w5, fe vce(bootstrap, reps(100)) cluster(gvkey)

Comment