This routine does the case-bootstrap described in the references below. Begin
with a regression object. For each of B bootstrap samples, sample the
non-missing rows of the data
matrix with replacement, and recompute and save estimates. For nls objects there may
be convergence problems in the bootstrap. The routine will continue until
convergence is attained B times, or until there are 25 consecutive failures to converge.
nextBoot
is an internal function that will update a model correctly, depending
on the class of the model object.
This simple routine should return a result with any S3 regression object that
can be updated using the update
function and has a subset
argument. It is OK in general for
linear regression, logistic regression in which the response is either zero or
one. With bionomial responses, one would generally want to resample one
observation, not all the observations in m trials, so this function will
incorrect results. The function can be used with Poisson regression with Poisson
sampling, but it is probably wrong for contingency tables with multinomial
sampling. It is OK proportional odds models without Frequencies set, but
inappropriate with Frequencies.