Dear all,
I am running the following program of the 2SLS estimation by hand, where
DV is a binary dependant variable
Y is an endogenous variable for which I am using treat*post as an instrument.
treat*post is the instrument of Y where treat = 1 if the county has the policy and 0 otherwise, post =1 if it's after 1998 (the year of the policy implementation) and 0 otherwise.
Using ivprobit does not work for me, it gives me the following error: "could not find initial values", ivprobit works if I either drop province by year fixed effects i.provinceXyear or county fixed effects i.coun.
For this reason I am opting for a 2SLS estimation by hand. The problem is that when bootstraping to correct for the SE it gives the following error: "insufficient observations to compute bootstrap standard errors
no results will be saved" even when using the nodrop option.
I think that this is happening may be because when subsampling, Stata is not taking enough random values before the policy and after the policy. Can this be the problem? if so how can I tell Stata to take obsevations before treat*post and after treat*post in each subsample? Please guide me. Thank you in advance.
This is my code:
I am running the following program of the 2SLS estimation by hand, where
DV is a binary dependant variable
Y is an endogenous variable for which I am using treat*post as an instrument.
treat*post is the instrument of Y where treat = 1 if the county has the policy and 0 otherwise, post =1 if it's after 1998 (the year of the policy implementation) and 0 otherwise.
Using ivprobit does not work for me, it gives me the following error: "could not find initial values", ivprobit works if I either drop province by year fixed effects i.provinceXyear or county fixed effects i.coun.
For this reason I am opting for a 2SLS estimation by hand. The problem is that when bootstraping to correct for the SE it gives the following error: "insufficient observations to compute bootstrap standard errors
no results will be saved" even when using the nodrop option.
I think that this is happening may be because when subsampling, Stata is not taking enough random values before the policy and after the policy. Can this be the problem? if so how can I tell Stata to take obsevations before treat*post and after treat*post in each subsample? Please guide me. Thank you in advance.
This is my code:
Code:
program my2sls *first step: reg Y treat*post other_control_vars i.provinceXyear i.coun, cluster(coun) predict Y_hat, xb gen residual = Y- Y_hat if e(sample) * second step: probit DV Y residual other_control_vars i.provinceXyear i.coun, cluster(coun) drop Y_hat residual end set seed 12358 bootstrap, reps(100) nodrop: my2sls
Comment