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
Related Posts with Boostrapping system of equations
double-hurdle model not feasibleHi, I'm using a panel double-hurdle model using Code: xtdhreg command. But I get the following err…
Create Twoway Line Graph Forcing Gaps for Missing PeriodsHi all, My data: Code: input float(Datum_n total_unem_bymonth sum_newpositions_bymonth) 723 14824…
Stata command for weighted M-estimator.Dear all, Does Stata has commands or packages that can estimate parameters for weighted M-estimator…
How I find the wrong data?Dear Statalist, I have the note: multiple positive outcomes within groups encountered, followed by c…
convert string yyyy-mm-dd hh:mm:ss to %td formatHello, As the title of this question suggests, I have a set of data with variable "Qtm" in string f…
Subscribe to:
Post Comments (Atom)
0 Response to Boostrapping system of equations
Post a Comment