Hi all,
I am working on addressing endogeneity issues in my approach looking at the effect of women's employment status (binary variable) on their experience of facing domestic violence (binary variable). I followed Prof. Wooldridge's advice and ran biprobit model - the estimates came out to be meaningful and statistically significant. I now need to implement 2SRI (CF approach) for robustness check, using the instrument variable (cluster average of women's employment status).
I drew upon DHS data, and I use STATA-17.
I tried the two recommended ways for 2sri - 1) bootstrapping and 2) Prof Terza's ACSE approach.
for (1): code I used for bootstrapping the whole prog is as follows. Herein, occp is the binary endogenous regressor; occp_mean_adj is the instrument; anyviolence is the primary outcome variable; X stands for all counterfactuals.
as I understand from Fernando Rios-Avila, this approach is problematic because weights and bootstrap do not go well together. Can somebody please suggest a way to go forward with bootstrapping, where survey-design and survey-weights can be accounted for?
I attempted the creation of bsweights but could not achieve this due to a singleton cluster error.
For (2): Matrix multiplication in the 2nd approach also does not happen because of conformability error (dimensional mismatch between betahat and X matrices). I am attaching Prof Terza's codes in my context - Y: outcome variable (anyviolence); Xe: endogenous regressor (occp); Xo: counterfactuals (some are categorical, some are binary and two are continuous); Wplus: instrument (occp_mean_adj)
Can somebody please advise on how to work around this issue?
Any help on implementing 2SRI with either approach will be of great help to me. Thank you.
Please let me know if any further information is required.
I am working on addressing endogeneity issues in my approach looking at the effect of women's employment status (binary variable) on their experience of facing domestic violence (binary variable). I followed Prof. Wooldridge's advice and ran biprobit model - the estimates came out to be meaningful and statistically significant. I now need to implement 2SRI (CF approach) for robustness check, using the instrument variable (cluster average of women's employment status).
I drew upon DHS data, and I use STATA-17.
I tried the two recommended ways for 2sri - 1) bootstrapping and 2) Prof Terza's ACSE approach.
for (1): code I used for bootstrapping the whole prog is as follows. Herein, occp is the binary endogenous regressor; occp_mean_adj is the instrument; anyviolence is the primary outcome variable; X stands for all counterfactuals.
Code:
program bsses17 preserve svy: probit occp occp_mean_adj X predict pvhat17,p gen uhat17 = occp - pvhat17 svy: probit anyviolence i.occp X uhat17 drop uhat17 restore end program bootstrap, reps(1000) seed (1937): bsses17
I attempted the creation of bsweights but could not achieve this due to a singleton cluster error.
For (2): Matrix multiplication in the 2nd approach also does not happen because of conformability error (dimensional mismatch between betahat and X matrices). I am attaching Prof Terza's codes in my context - Y: outcome variable (anyviolence); Xe: endogenous regressor (occp); Xo: counterfactuals (some are categorical, some are binary and two are continuous); Wplus: instrument (occp_mean_adj)
Code:
svy: probit Xe Xo Wplus predict phiWalpha, p gen Xuhat=Y-phiWalpha mata: alphahat=st_matrix("e(b)")' mata: Valphahat=st_matrix("e(V)") svy: probit Y Xe Xo Xuhat mata: betahat=st_matrix("e(b)")' mata: Vbetahat=st_matrix("e(V)") mata: Bu=betahat[3] putmata Y Xe Xo Wplus Xuhat mata: X=Xe, Xo, Xuhat, J(rows(Xo),1,1) mata: W=Xo, Wplus, J(rows(Xo),1,1) mata: gradbeta=exp(X*betahat):*X mata: gradalpha=-Bu:*normalden(X*betahat):*exp(W*alphahat):*W
Any help on implementing 2SRI with either approach will be of great help to me. Thank you.
Please let me know if any further information is required.