Dear Statalisters,
I am trying to bootstrap the standard error in the Control Function:
1) First stage OLS regression: $x = $control + $iv + i.ind_county_ym
then predict the residuals to be vh
2) 2nd stage Probit regression (Y is 0/1): $Y = $x + $control + vh + i.ind_county_ym
Following is my code. It reports error “insufficient observations to compute bootstrap standard errors, no results will be saved”.
I real other posts, had tried to add “nodrop” option, add “ereturn clear”.. none of them works.
However:
when I change the second stage to be OLS, that is “reghdfe $Y $x $control vh, absorb(ind_county_ym) “, it works ;
Or, when I directly run probit without bootstrap, it works.
Any idea what is going on? Thank you very much!
I am trying to bootstrap the standard error in the Control Function:
1) First stage OLS regression: $x = $control + $iv + i.ind_county_ym
then predict the residuals to be vh
2) 2nd stage Probit regression (Y is 0/1): $Y = $x + $control + vh + i.ind_county_ym
Following is my code. It reports error “insufficient observations to compute bootstrap standard errors, no results will be saved”.
Code:
cap pr drop cre_cf pr cre_cf, rclass cap drop vh reghdfe $x $control $iv , absorb(ind_county_ym ) resid predict vh, resid return scalar b_iv = _b["$iv"] probit $Y $x $control vh i.ind_county_ym return scalar b_ppp = _b["$x"] drop vh end * START Bootstrap xtset, clear ereturn clear bootstrap r(b_iv) r(b_ppp), reps(2000) seed(123) cluster(ind_county_ym) nodrop : cre_cf
However:
when I change the second stage to be OLS, that is “reghdfe $Y $x $control vh, absorb(ind_county_ym) “, it works ;
Or, when I directly run probit without bootstrap, it works.
Any idea what is going on? Thank you very much!
Comment