Learn R Programming

capwire (version 1.1.4)

bootstrapCapwire: Parametric Bootstrap ECM and TIRM Models

Description

Uses maximum likelihood parameter estimates from fitEcm, fitTirm, or fitTirmPartition to perform a parametric bootstrap to get confidence intervals for the estimate of the population size

Usage

bootstrapCapwire(x, bootstraps = 1000, CI = c(0.025, 0.975))

Arguments

x
An object inherited from fitEcm, fitTirm, or fitTirmPartition
bootstraps
The number of bootstraps to be performed (default is 1000)
CI
A vector of quantiles to to generate a confidence interval for the population estimate. The default is c(0.025, 0.975), denoting a symmetrical 95 percent confidence interval.

Value

  • ml.pop.sizeThe maximum likelihood estimate for the population size obtained by fitting the model
  • conf.intThe confidence interval for the estimate of the population size

Details

This function uses the ML estimates obtained from fitting the model to simulate data under the model.

bootstrapCapwire inherits an object from fitEcm, fitTirm, or fitTirmPartition such that the model and parameter estimates do not need to be specified.

The ML estimate for the population size will also be returned but this will not be changed by bootstrapCapwire

Note that if the model is a poor fit to the data, the confidence intervals may not be reliable.

The lower confidence interval is bounded by the number of unique individuals in the sample.

References

Miller C. R., P. Joyce and L.P. Waits. 2005. A new method for estimating the size of small populations from genetic mark-recapture data. Molecular Ecology 14:1991-2005.

See Also

fitEcm, fitTirm, fitTirmPartition

Examples

Run this code
## Simulate data under Equal Capture Model

data <- simEcm(n=40, s=150)

## Fit Equal Capture Model to Data

res <- fitEcm(data=data, max.pop=200)

## Perform bootstrap to get confidence intervals

ci <- bootstrapCapwire(x=res, bootstraps=50, CI = c(0.025, 0.975))

Run the code above in your browser using DataLab