bb.test {countdata}R Documentation

The beta-binomial test

Description

Performs the beta-binomial test for count data.

Usage

bb.test(x, tx, group, alternative = c("two.sided", "less", "greater"),
        n.threads = -1, verbose = TRUE)

Arguments

x

A vector or matrix of counts. When x a matrix, the test is performed row by row.

tx

A vector or matrix of the total sample counts. When tx is a matrix, the number of rows must be equal to the number of rows of x.

group

A vector of group indicators.

alternative

A character string specifying the alternative hypothesis: "two.sided" (default), "greater" or "less".

n.threads

The number of threads to be used. When n.threads is 0, the maximal number of CPU cores is used. When n.threads is -1 (default), one CPU core less than the maximum is used, and so on.

verbose

A logical value. If TRUE (default), status information is printed.

Details

This test is designed for independent samples, two or more groups.

Value

A list with a single component is returned

p.value

The p-value of the test.

Author(s)

Thang V. Pham

References

Pham TV, Piersma SR, Warmoes M, Jimenez CR (2010) On the beta binomial model for analysis of spectral count data in label-free tandem mass spectrometry-based proteomics. Bioinformatics, 26(3):363-369.

Examples

x <- c(1, 5, 1, 10, 9, 11, 2, 8)

tx <- c(19609, 19053, 19235, 19374, 18868, 19018, 18844, 19271)

group <- c(rep("cancer", 3), rep("normal", 5))

bb.test(x, tx, group)
# p.value = 0.01568598

[Package countdata version 1.3 Index]