Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/rdraws_rpvals.R
Approximates the power of a hypothesis test of the Petersen estimator by means of many simulated draws from a specified alternative distribution, conditioned on sample sizes.
1 2 3 4 5 6 7 8 9 | powPetersen(
nullN,
trueN,
n1,
n2,
alpha = 0.05,
nsim = 10000,
alternative = "less"
)
|
nullN |
The abundance given by the null hypothesis |
trueN |
The assumed abundance for the power calculation |
n1 |
Number of individuals captured and marked in the first sample |
n2 |
Number of individuals captured in the second sample |
alpha |
The alpha level for the test |
nsim |
Number of simulated values to draw. Defaults to 10000. |
alternative |
Direction of the alternative hypothesis. Allowed values
are |
The approximate power of the specified hypothesis test, for the specified alternative value.
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, rPetersen, pPetersen, ciPetersen
1 2 3 4 5 6 | powPetersen(nullN=500, trueN=400, n1=100, n2=100, nsim=1000)
Ntotry <- seq(from=250, to=450, by=25)
pows <- sapply(Ntotry, function(x)
powPetersen(nullN=500, trueN=x, n1=100, n2=100, nsim=1000))
plot(Ntotry, pows)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.