The C(alpha) test is a test of the binomial distribution against the alternative of the beta-binomial distribution. Note that this is not exported to the package namespace but kept internal. The license is MIT with the COPYRIGHT HOLDER: Christophe Gigot and YEAR: 2023 (included in source code). The function is included for validation purpose. Please use epiphy package for related calculation in a non-GLP environment.
Value
Same kind of object as the one returns by the stats
chisq.test function for example.
Details
It is based on calculation of a test statistic, z, that has an asymptotic standard normal distribution under the null hypothesis. It is one-sided (in the way that the alternative is aggregation, not just "non-randomness"), thus with a confidence level of 95%, the null hypothesis is rejected when z > 1.64. When all the sampling units contain the same total number of individuals, n, the test statistic is calculated from:
z = (n(N - 1)I - Nn)/(2Nn(n - 1))^(1/2)
where N is the number of sampling units, and I, Fisher's index of aggregation for incidence data.
References
Neyman J. 1959. Optimal asymptotic tests of composite statistical hypotheses. In: Probability and Statistics, 213-234. Wiley, New York.
Tarone RE. 1979. Testing the goodness of fit of the binomial distribution. Biometrika, 66(3): 585-590.
See also
chisq.test, z.test
Examples
# For incidence data:
# my_incidence <- epiphy::incidence(epiphy::tobacco_viruses)
# my_fisher <- epiphy::agg_index(my_incidence, method = "fisher")
my_fisher <- structure(list(index = 3.14396182555326,
name = "Fisher's index of dispersion", flavor = "incidence", N = 75L, n = 40L),
class = c("fisher", "agg_index"))
drcHelper:::calpha.test(my_fisher)
#>
#> C(alpha) test
#>
#> data: my_fisher
#> z = 13.036, p-value < 2.2e-16
#>