Hi, I am trying to bootstrap standard errors for a system of equations (its a 2SLS where I create the first stage fitted values, and use in second stage as regressors; see my code below). But it produces ONLY the second stage output; how do I retrieve the first stage output too with bootstrapped standard errors?

Many thanks

* Produce bootstrap standard errors

capture program drop bootiv
program bootiv, eclass
{
* 1st stage T11 col1
reg inq d_sob past_rel low_score medium_score high_score male_dum log_age ///
i.tier i.qtr_yr, cl(fid) /* 1st stage */
predict xbvar, xb

** 2nd stage col 2 t11
reg default2_360 xbvar past_rel low_score medium_score high_score male_dum log_age ///
log_loan i.new_acctid i.tier i.qtr_yr if e(sample), cl(fid) /* 2nd stage */
sum xbvar if e(sample), detail
drop xbvar
}

end

set seed 1
bootstrap, reps(5) seed(123): bootiv
outreg2 using "BS check.xls", append ctitle("Boostrapped SE") bdec(4) tdec(4) se