I am not sure if this is kosher but I am trying to calculate bootstrapped standard errors for a two-sample IV. (As an aside, for some reason user-written commands like weaktsiv are not working in my setting, and anyway I don't think it can calculate clustered errors.) I'm not sure if bootstrapping is the way to go, but in any case, I am getting the typical "insufficient observations" error. Here is my code:

Code:
program tsiv
reg yrschl inter bXn_* bX71_* bXws_* if male == 1
predict double xhat, xb
reg tr01 xhat bXn_* bX71_* bXws_* if male == 1
drop xhat
end

bootstrap, reps(2) nodrop: "tsiv"
My data is two stacked data sets, one which includes the variable yrschl but not tr01, and another which includes tr01 but not yrschl.

According to this discussion, https://www.statalist.org/forums/for...s-will-be-save, bootstrap will keep only the observations from the first regression. I thought "nodrop" would resolve the issue, as suggested in the discussion. But I get the same error with or without this option. What might be going wrong with my code?

The full error is:

Code:

. bootstrap, reps(2): tsiv
(running tsiv on estimation sample)

Bootstrap replications (2)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
xx
insufficient observations to compute bootstrap standard errors
no results will be saved
r(2000);