Tests on Abundance Data

test_diversity(object, ...)

test_fit(object, ...)

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

# S4 method for CountMatrix
test_fit(object, simplify = FALSE, ...)



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


Further arguments to be passed to internal methods.


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


A logical scalar: should the result be simplified to a matrix?


If simplify is FALSE, returns a list (default), else returns a matrix.


The following methods are available:


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


The Frequency Increment Test (Feder et al. 2014). This test rejects neutrality if the distribution of normalized variant frequency increments exhibits a mean that deviates significantly from zero.


Feder, A. F., Kryazhimskiy, S. & Plotkin, J. B. (2014). Identifying Signatures of Selection in Genetic Time Series. Genetics, 196(2), 509-522. DOI: 10.1534/genetics.113.158220.

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


## 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)