bootstrapCapwire | R Documentation |
Uses maximum likelihood parameter estimates from fitEcm
, or fitTirm
to perform a parametric bootstrap to get confidence intervals for the estimate of the population size
bootstrapCapwire(fit, bootstraps = 1000, CI = c(0.025, 0.975))
fit |
a |
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 |
This function uses the ML estimates obtained from fitting the model to simulate data under the model.
bootstrapCapwire
inherits an object from fitEcm
or fitTirm
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.
A list containing the following elements:
The maximum likelihood estimate for the population size obtained by fitting the model
The confidence interval for the estimate of the population size
Matthew W. Pennell
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.
Pennell, M. W., C. R. Stansbury, L. P. Waits and C. R. Miller. 2013. Capwire: a R package for estimating population census size from non-invasive genetic sampling. Molecular Ecology Resources 13:154-157.
fitTirm
, fitEcm
## 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(fit=res, bootstraps=50, CI = c(0.025, 0.975)) ci
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.