recapr (version 0.4.3)

strattest: Consistency Tests for the Abundance Estimator, Complete Stratification

Description

Conducts two chi-squared tests for the consistency of the Petersen-type abundance estimator. These tests provide explore evidence against equal capture probabilities in either the first or second sampling event. Also conducts a third chi-squared test of unequal capture probabilities between sampling events for each stratum, in the case of small sample sizes (fewer than 100 in either sampling event and fewer than 30 recaptures), which may be used to suggest unequal capture probabilities in either the first or second event.

Typically, if either of the first two test p-values is greater than the significance level, use of a Petersen-type estimator is considered justified.

If tests give evidence of unequal capture probabilities between strata, a stratified estimator should be used, such as Nstrat.

This function assumes stratification in both sampling events, such that individuals cannot move from one strata to another (such as by size or gender). If movement between strata may occur (such as in the case of stratification by time or area), use of consistencytest is recommended.

Usage

strattest(n1, n2, m2, ...)

Arguments

n1

Vector of n1 counts (sample size in the first event), each element corresponding to one stratum.

n2

Vector of n2 counts (sample size in the second event), each element corresponding to one stratum.

m2

Vector of m2 counts (number of recaptures in the second event), each element corresponding to one stratum.

...

Additional arguments for chisq.test

Value

A list of class "recapr_strattest" with the following components:

  • event1_table The contingency table used for the first test

  • event1_Xsqd The chi-squared test statistic in the first test

  • event1_df The associated degrees of freedom in the first test

  • event1_pval The p-value returned from the first test

  • event2_table The contingency table used for the second test

  • event2_Xsqd The chi-squared test statistic in the second test

  • event2_df The associated degrees of freedom in the second test

  • event2_pval The p-value returned from the second test

  • event1v2_table The contingency table used for the third test

  • event1v2_Xsqd The chi-squared test statistic in the third test

  • event1v2_df The associated degrees of freedom in the third test

  • event1v2_pval The p-value returned from the second third

See Also

powstrattest, Nstrat, consistencytest

Examples

Run this code
# NOT RUN {
strattest(n1=c(100,100), n2=c(50,200), m2=c(20,15))
# }

Run the code above in your browser using DataCamp Workspace