Frequency Increment Test

test_fit(object, ...)

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

Arguments

object

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

...

Currently not used.

simplify

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

Value

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

Details

The Frequency Increment Test (FIT) rejects neutrality if the distribution of normalized variant frequency increments exhibits a mean that deviates significantly from zero.

References

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.

See also

Other statistics: independance, refine, test_diversity()

Author

N. Frerebeau

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)