Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Nonconvergence in subset of bootstrap samples doesn't show up in e(N_misreps)


From   Christoph Siemroth <[email protected]>
To   [email protected]
Subject   Re: st: Nonconvergence in subset of bootstrap samples doesn't show up in e(N_misreps)
Date   Wed, 06 Mar 2013 00:49:52 +0100

Hi Emilia,

I had a similar problem, where I bootstraped with various nonlinear models estimated via ML, and for some bootstrap replications it didn't converge. An option that seems reasonable is to cap the maximum number of iterations of ML via option ", iterate(#)" in the estimation command and then use e(converged)!=1 to exclude those failed samples. This is possible with the ",reject(e(converged)!=1)" option of bootstrap. I use something like

bootstrap, reps(25) reject(e(converged)!=1): nbreg depvar $a, iterate(30)

This was suggested by Jeff Pitblado, http://www.stata.com/statalist/archive/2006-04/msg00721.html

Although it is technically possible, could that render bootstrapping results biased? After all, we are systematically excluding some bootstrap samples.

best, Christoph

----
Emilia Tjernström wrote:

Dear Statalist,

I am estimating a panel data quantile model, bootstrapping the
standard errors from -sqreg- using -bootstrap-. Some small portion of
the bootstrap replications fail to converge, and I believe that I need
to account for the failed replications when creating the bootstrapped
variance-covariance matrix. To my surprise, however, both e(N_reps)
and e(reps) after -bs- indicate that there are no incomplete
replications or missing results, respectively. [The reason that I'm
bootstrapping is that I need to draw households rather than individual
observations, to take into account the dependence of outcomes for a
given household  -- I'm following the approach to panel data quantile
estimation suggested in Abrevaya and Dahl (2008) "The Effects of Birth
Inputs on Birthweight." Journal of Business & Economic Statistics
26(4): 379–397.]

My plan was to use the number of completed reps (i.e. e(N_reps)) in
the last line of code below to account for any failed replications.
Here is some code:

--- (Using Stata 10)
* Bootstrapping
bs _b, rep($reps) noi cl(hhid) seed($seed) saving(`y'_sqreg, replace
double every(100)): sqreg `y' $xvars, quantile(.25 .5 .75) wlsiter(30)
reps(2)
local comp_reps = e(N_reps)
local failreps = e(N_misreps)
di "The nr of complete replications: " `comp_reps' " and incomplete
reps: " `failreps'
mat li e(reps)

* Obtaining var-cov matrix
(... using the data saved from the bootstrap)
matrix accum VCE_`y' = q*, deviations noconstant
matrix VCE_`y' = VCE_`y'/(`comp_reps'-1)
---

Despite some failures to converge, e(N_reps) always equals $reps,
e(N_misreps) always equals 0, and all the entries in e(reps) equal
$reps
Am I missing something? Is there a better way to count the number of
successful bootstrap replications?

Thank you very much for your time!
Emilia
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index