Xoc.sevsample {HMP} | R Documentation |
Likelihood-Ratio-Test Statistics: Several Sample Overdispersion Test Comparison
Description
This routine provides the value of the likelihood-ratio-test statistic and the corresponding p-value to assess whether the overdispersion observed in multiple groups of microbiome samples are equal.
Usage
Xoc.sevsample(group.data, epsilon = 10^(-4))
Arguments
group.data |
A list where each element is a matrix of taxonomic counts(columns) for each sample(rows). (See Notes 1 and 2 in details) |
epsilon |
Convergence tolerance. To terminate, the difference between two succeeding log-likelihoods must be smaller than epsilon. Default value is 10^(-4). |
Details
To assess whether the over dispersion parameter vectors observed in
groups of microbiome samples are equal to each other, the following hypothesis
versus
can be tested. In particular, the likelihood-ratio test statistic is used (Tvedebrink, 2010), which is given by,
The asymptotic null distribution of follows a Chi-square with degrees of freedom equal to (J-1) (Wilks, 1938).
Note 1: The matrices in
group.data
must contain the same taxa, in the same order.Note 2: Each taxa should be present in at least 1 sample, a column with all 0's may result in errors and/or invalid results.
Value
A list containing the Xoc statistics and p-value.
References
Tvedebrink, T. (2010). Overdispersion in allelic counts and theta-correction in forensic genetics. Theor Popul Biol 78, 200-210.
Wilks, S. S. (1938). The Large-Sample Distribution of the Likelihood Ratio for Testing Composite Hypotheses. The Annals of Mathematical Statistics 9, 60-62.
Examples
data(saliva)
data(tonsils)
### Combine the data sets into a single list
group.data <- list(saliva, tonsils)
## Not run:
xoc <- Xoc.sevsample(group.data)
xoc
## End(Not run)