cistrat: Confidence Intervals for the Stratified Estimator

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/stratified.R

Description

Calculates approximate confidence intervals(s) for the Stratified estimator, using bootstrapping, the Normal approximation, or both.

The bootstrap interval is created by resampling the data in the second sampling event, with replacement for each stratum; that is, drawing bootstrap values of m2 from a binomial distribution with probability parameter m2/n2.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
cistrat(
  n1,
  n2,
  m2,
  conf = 0.95,
  method = "both",
  bootreps = 10000,
  estimator = "Chapman",
  useChapvar = FALSE
)

Arguments

n1

Number of individuals captured and marked in the first sample

n2

Number of individuals captured in the second sample

m2

Number of marked individuals recaptured in the second sample

conf

The confidence level of the desired intervals. Defaults to 0.95.

method

Which method of confidence interval to return. Allowed values are "norm", "boot", or "both". Defaults to "both".

bootreps

Number of bootstrap replicates to use. Defaults to 10000.

estimator

The type of estimator to use. Allowed values are "Chapman", "Petersen", and "Bailey". Default to "Chapman".

useChapvar

Whether to use the Chapman estimator variance instead of the Petersen estimator variance for the normal-distribution interval, if "method" is set to "Petersen". Defaults to FALSE.

Value

A list with the abundance estimate and confidence interval bounds for the normal-distribution and/or bootstrap confidence intervals.

Note

Both the bootstrap and the normal approximation intervals make the naive assumption of independence between strata, which may not be the case. The user therefore cautioned, and is encouraged to investigate the coverage under relevant scenarios.

Author(s)

Matt Tyers

See Also

\linkstrattest, Nstrat, rstrat, vstrat, sestrat, NChapman, NPetersen, NBailey

Examples

1
cistrat(n1=c(100,200), n2=c(100,500), m2=c(10,10))

recapr documentation built on Sept. 8, 2021, 5:07 p.m.