Compares Shannon diversity between samples.

test_diversity(object, ...)

# S4 method for CountMatrix
test_diversity(object, adjust = "holm", ...)

Arguments

object

A \(m \times p\) matrix of count data.

...

Further arguments to be passed to internal methods.

adjust

A character string specifying the method for adjusting \(p\) values (see p.adjust).

Value

A numeric matrix.

Details

This test produces two sided pairwise comparisons: it returns a matrix of adjusted \(p\) values.

References

Magurran, A. E. (1988). Ecological Diversity and its Measurement. Princeton, NJ: Princeton University Press. DOI: 10.1007/978-94-015-7358-0.

See also

Other statistics: independance, refine, test_fit()

Examples

## Shannon diversity test merzbach_count <- as_count(merzbach) div <- test_diversity(merzbach_count) ## Frequency Increment Test ## Coerce the merzbach dataset to a count matrix ## Keep only decoration types that have a maximum frequency of at least 50 keep <- apply(X = merzbach, MARGIN = 2, FUN = function(x) max(x) >= 50) merzbach_count <- as_count(merzbach[, keep]) ## The data are grouped by phase ## We use the row names as time coordinates (roman numerals) set_dates(merzbach_count) <- rownames(merzbach) fit <- test_fit(merzbach_count, simplify = TRUE)