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

View source: R/rdraws_rpvals.R

Returns a vector of random draws from the Petersen estimator in a mark-recapture experiment, given values of the true abundance and the sample size in both events. The function first simulates a vector of recaptures (m2) from a hypergeometric distribution, and then uses these to compute a vector of draws from the estimator.

If capture probabilities (`p1`

and/or `p2`

) are specified instead of sample size(s), the sample size(s) will first be drawn from a binomial distribution, then the number of recaptures. If both sample size and capture probability are specified for a given sampling event, only the sample size will be used.

1 |

`length` |
The length of the random vector to return. |

`N` |
The value of the true abundance. This may be a single number or
vector of values equal to |

`n1` |
Number of individuals captured and marked in the first sample. This
may be a single number or vector of values equal to |

`n2` |
Number of individuals captured in the second sample. This may be a
single number or vector of values equal to |

`p1` |
Alternately, probability of capture in the first sample. This
may be a single number or vector of values equal to |

`p2` |
Alternately, probability of capture in the second sample. This may be a
single number or vector of values equal to |

A vector of random draws from the Petersen estimator

Any Petersen-type estimator (such as this) depends on a set of assumptions:

The population is closed; that is, that there are no births, deaths, immigration, or emigration between sampling events

All individuals have the same probability of capture in one of the two events, or complete mixing occurs between events

Marking in the first event does not affect probability of recapture in the second event

Individuals do not lose marks between events

All marks will be reported in the second event

Matt Tyers

NPetersen, vPetersen, sePetersen, pPetersen, powPetersen, ciPetersen

1 2 | ```
draws <- rPetersen(length=100000, N=500, n1=100, n2=100)
plotdiscdensity(draws) #plots the density of a vector of discrete values
``` |

mbtyers/recapr documentation built on May 22, 2017, 1:06 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.