consistencytest {recapr} | R Documentation |
Consistency Tests for the Abundance Estimator, Partial Stratification
Description
Conducts three chi-squared tests for the consistency of the Petersen-type abundance estimator. These tests explore evidence against the second traditional assumption of the Petersen mark-recapture experiment: that equal capture probabilities exist in either the first or second sampling event, or that complete mixing occurs between events.
Typically, if any of these test p-values is greater than the significance level, use of a Petersen-type estimator is considered justified. If all three tests give p-values below the significance level and no movement occurs between strata (and strata are the same between events), a stratified estimator may be used. If all three tests give p-values below the significance level and some movement between strata occurs, a partially stratified (Darroch-type) estimator must be used, such as NDarroch.
This function assumes stratification in both sampling events, and in different ways (by time, area, etc.) If stratification was the same in both events such that individuals could not move from one strata to another (such as by size or gender), use of strattest is recommended.
Usage
consistencytest(
n1,
n2,
m2strata1 = NULL,
m2strata2 = NULL,
stratamat = NULL,
...
)
Arguments
n1 |
A vector of the total sample sizes in the first event, by
strata. For example, setting |
n2 |
A vector of the total sample sizes in the second event, by strata. |
m2strata1 |
A vector of the first-event stratum membership of each
recaptured individual. Only values |
m2strata2 |
A vector of the second-event stratum membership of each
recaptured individual. Only values |
stratamat |
A matrix specifying the number of recaptures in each
combination of event 1 and event 2 strata, with rows corresponding to event
1 strata and columns corresponding to event 2 strata. May be used instead
of |
... |
Additional arguments for chisq.test |
Value
A list of class "recapr_consistencytest"
with the following components:
test1_tab
The contingency table used for the first testtest1_Xsqd
The chi-squared test statistic in the first testtest1_df
The associated degrees of freedom in the first testtest1_pval
The p-value returned from the first testtest2_tab
The contingency table used for the second testtest2_Xsqd
The chi-squared test statistic in the second testtest2_df
The associated degrees of freedom in the second testtest2_pval
The p-value returned from the second testtest3_tab
The contingency table used for the third testtest3_Xsqd
The chi-squared test statistic in the third testtest3_df
The associated degrees of freedom in the third testtest3_pval
The p-value returned from the third test
Note
Naming conventions for the second and third tests are taken from SPAS (see reference)
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
Author(s)
Matt Tyers
References
Stratified Population Analysis System (Arnason, A.N., C.W. Kirby, C.J. Schwarz and J.R. Irvine. 1996. Computer Analysis of Data from Stratified Mark-Recovery Experiments for Estimation of Salmon Escapements and Other Populations, Canadian Technical Report of Fisheries and Aquatic Sciences 2106).
See Also
Examples
consistencytest(n1=c(15,12,6), n2=c(12,9,10,8),
m2strata1=c(1,1,1,1,1,2,2,2,3,3),
m2strata2=c(1,1,3,3,4,1,2,4,1,3),
simulate.p.value=TRUE)
mat <- matrix(c(30,15,1,0,22,15), nrow=2, ncol=3, byrow=TRUE)
consistencytest(n1=c(284,199), n2=c(347,3616,1489), stratamat=mat)