Xdc.sevsample {HMP} | R Documentation |
Likelihood-Ratio-Test Statistics: Several Sample Dirichlet-Multinomial Test Comparison
Description
This routine provides the value of the Likelihood-Ratio-Test Statistics and the corresponding p-value for evaluating the several sample Dirichlet-Multinomial parameter test comparison.
Usage
Xdc.sevsample(group.data, epsilon = 10^(-4), est = "mom")
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). |
est |
The type of parameter estimator to be used with the Likelihood-ratio-test statistics, 'mle' or 'mom'. Default value is 'mom'. (See Note 3 in details) |
Details
To assess whether the Dirichlet parameter vector, (a function of the RAD probability-mean vector and overdispersion), observed in
groups of microbiome samples are equal to each other, the following hypothesis
versus
can be tested. The null hypothesis implies that the HMP samples across groups have the same mean and overdispersion, indicating that the RAD models are identical. In particular, the likelihood-ratio test statistic is used, which is given by,
The asymptotic null distribution of follows a Chi-square with degrees of freedom equal to (J-1)*K, where K is the number of taxa (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.
Note 3: 'mle' will take significantly longer time and may not be optimal for small sample sizes; 'mom' will provide more conservative results in such a case.
Value
A list containing the Xdc statistics and p-value.
References
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(throat)
### Combine the data sets into a single list
group.data <- list(saliva, throat)
xdc <- Xdc.sevsample(group.data)
xdc