Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hyperCI

Confidence interval for population size (N) in hypergeometric distribution.


Description

Computes a confidence interval for population size (N) in hypergeometric distribution.

Usage

hyperCI(M, n, m, conf.level = 0.95)

Arguments

M

Number of successes in the population.

n

Number of observations in the sample.

m

Number of observed successes in the sample.

conf.level

Level of confidence to use for constructing confidence intervals (default is 0.95).

Details

This is an inefficient brute-force algorithm. The algorithm computes the conf.level range of possible values for m, as if it was unknown, for a large range of values of N. It then finds all possible values of N for which m was in the conf.level range. The smallest and largest values of N for which m was in the conf.level range are the CI endpoints.

Value

A 1x2 matrix that contains the lower and upper confidence interval bounds.

Note

This algorithm is experimental at this point.

Author(s)

Derek H. Ogle, derek@derekogle.com

Examples

hyperCI(50,25,10)

FSA

Simple Fisheries Stock Assessment Methods

v0.8.32
GPL (>= 2)
Authors
Derek Ogle [aut, cre] (<https://orcid.org/0000-0002-0370-9299>), Powell Wheeler [aut], Alexis Dinno [aut] (Provided base functionality of dunnTest())
Initial release
2021-1-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.