boot.ascr: Bootstrapping a fitted ascr model

View source: R/boot.r

boot.ascrR Documentation

Bootstrapping a fitted ascr model

Description

Carries out a parametric bootstrap, based on a model fitted using fit.ascr.

Usage

boot.ascr(fit, N, prog = TRUE, n.cores = 1, M = 10000, infotypes = NULL)

boot.admbsecr(fit, N, prog = TRUE, n.cores = 1, M = 10000, infotypes = NULL)

Arguments

fit

A fitted ascr model object.

N

The number of bootstrap resamples.

prog

Logical, if TRUE, a progress bar is shown. Only available if n.cores is 1.

n.cores

A positive integer representing the number of cores to use for parallel processing.

M

The number of bootstrap resamples for the secondary bootstrap used to calculate Monte Carlo error. See 'Details' below. If M = 0, then this is skipped.

infotypes

A list, where each component contains information types for subsequent bootstrap procedures. See 'Details'.

Details

For each bootstrap resample, a new population of individuals is simulated within the mask area. Detections of these individuals are simulated using the estimated detection function. For detected individuals, additional information is simulated from the estimated distribution of measurement error. The original model is then re-fitted to these simulated data, and parameter estimates for each iteration saved in the component boot of the returned list.

Note that generic functions stdEr and vcov with an object of class ascr.boot as the main argument will return standard errors and the variance-covariance matrix for estimated parameters based on the bootstrap procedure (via the stdEr.ascr.boot and vcov.ascr.boot methods). For standard errors and the variance-covariance matrix based on maximum likelihood asymptotic theory, the methods stdEr.ascr and vcov.ascr must be called directly.

If infotypes is provided it should take the form of a list, where each component is a subset of information types (i.e., fit$infotypes) used to fit the original model. A NULL component is associated with no additional information. The bootstrap procedure is then repeated for each component, only utilising the appropriate additional information. In practice this is only useful if the user is looking to investigate the benefits of including particular information types. The results from these extra bootstrap procedures can be found in the boot$extra.boots component of the returned object.

Value

A list of class "ascr.boot". Components contain information such as estimated parameters and standard errors. The best way to access such information, however, is through the variety of helper functions provided by the ascr package. S3 methods stdEr.ascr.boot and vcov.ascr.boot can be used to return standard errors and the variance-covariance matrix of estimated parameters based on the bootstrap procedure.

Bootstrapping for acoustic surveys

For fits based on acoustic surveys where the argument cue.rates is provided to the fit.ascr function, the simulated data allocates multiple calls to the same location based on an estimated distribution of the call frequencies. Using a parametric bootstrap is currently the only way parameter uncertainty can be estimated for such models. See Stevenson et al. (2015) for details.

Monte Carlo error

There will be some error in esimates based on the parametric bootstrap (e.g., standard errors and estimates of bias) because the number of bootstrap simulations is not infinite. By default, this function calculates Monte Carlo error using a bootstrap of the estimates obtained from the initial bootstrap procedure; see Equation (9) in Koehler, Brown and Haneuse (2009). Note that this secondary bootstrap does not require the fitting of any further models, and so the increased processing time due to this procedure is negligible.

Monte Carlo error for standard errors and estimates of bias can be extracted using the function get.mce.

References

Koehler, E., Brown, E., and Haneuse, S. J.-P. A. (2009) On the assessment of Monte Carlo error in sumulation-based statistical analyses. The American Statistician, 63: 155–162.

Stevenson, B. C., Borchers, D. L., Altwegg, R., Swift, R. J., and Gillespie, D. M., and Measey, G. J. (2015) A general framework for animal density estimation from acoustic detections across a fixed microphone array. Methods in Ecology and Evolution, 6(1): 38–48.

Examples

## Not run: 
## In practice, N should be >> 100, but this leads to long computation time for a simple example.
boot.fit <- boot.ascr(fit = example.data$fits$simple.hn, N = 100)

## End(Not run)


b-steve/ascr documentation built on Aug. 15, 2022, 2:38 p.m.