Skip to contents

Generates multinomial bootstrap samples and fits every retained hierarchical model to each sample. When requested, model-data combinations are screened using check_extended_MLE_batch() before fitting.

Usage

bootstrapcal(
  z,
  nboot = 1000,
  iseed = 1234,
  checkexist = TRUE,
  saveinterval = Inf,
  checkpoint = NULL
)

Arguments

z

A result from assemble_bic() or subsetmat().

nboot

Number of bootstrap replications.

iseed

Integer random-number seed.

checkexist

If TRUE, check identifiability and existence of the extended MLE for each model and support pattern before fitting.

saveinterval

Number of bootstrap replications between calls to checkpoint. The default, Inf, disables checkpointing.

checkpoint

Optional function taking the accumulating result z as its sole argument. Its return value is ignored. Must be supplied when saveinterval is finite. The default is NULL. The function may inspect or store the result; bootstrapcal() itself does not write any files. Replications not yet processed have NA entries in bootabund and bootbic.

Value

The input list z, with the following components added or replaced:

countsobserved

Counts for the complete set of observable capture histories.

bootreplications

A matrix whose columns contain the bootstrap counts.

bootabund

A matrix of population estimates, with models in rows and bootstrap replications in columns.

bootbic

A corresponding matrix of BIC values.

References

Silverman, B. W., Chan, L. and Vincent, K., (2024). Bootstrapping Multiple Systems Estimates to Account for Model Selection. Statistics and Computing, 34, 44. doi:10.1007/s11222-023-10346-9 .