Performs chi-squared tests for Fisher's aggregation indices (computed with either count or incidence data). If another kind of data is provided, the R standard chisq.test function is called.

chisq.test(x, ...)

# S3 method for default
chisq.test(x, ...)

# S3 method for fisher
chisq.test(x, ...)

Arguments

x

Either the output of the agg_index function with method = "fisher" as parameter, or another R object. In the latter case, stats::chisq.test is called.

...

Further arguments to be passed to stats::chisq.test.

Details

Under the null hypothesis for Fisher's aggregation index (index = 1, i.e. a random pattern is observed), (N - 1)*index follows a chi-squared distribution with N - 1 degrees of freedom. N is the number of sampling units.

References

For count and incidence data:

Madden LV, Hughes G. 1995. Plant disease incidence: Distributions, heterogeneity, and temporal analysis. Annual Review of Phytopathology 33(1): 529–564. doi:10.1146/annurev.py.33.090195.002525

Patil GP, Stiteler WM. 1973. Concepts of aggregation and their quantification: a critical review with some new results and applications. Researches on Population Ecology, 15(1): 238-254.

See also

Examples

# For incidence data: my_incidence <- incidence(tobacco_viruses) my_fisher <- agg_index(my_incidence, method = "fisher") chisq.test(my_fisher)
#> #> Chi-squared test for (N - 1)*index following a chi-squared #> distribution (df = N - 1) #> #> data: my_fisher #> X-squared = 232.65, df = 74, p-value < 2.2e-16 #>