# Xoc.sevsample: Likelihood-Ratio-Test Statistics: Several Sample... In HMP: Hypothesis Testing and Power Calculations for Comparing Metagenomic Samples from HMP

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

 1 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 θ_{\mathrm{m}} observed in J groups of microbiome samples are equal to each other, the following hypothesis \mathrm{H}_{\mathrm{o}}: θ_{\mathrm{1}} = \cdots =θ_{\mathrm{m}} =\cdots=θ_{\mathrm{J}}=θ_{\mathrm{o}} versus \mathrm{H}_{\mathrm{a}}: θ_{\mathrm{m}} \ne θ_{\mathrm{o}}, m=1, …, J can be tested. In particular, the likelihood-ratio test statistic is used (Tvedebrink, 2010), which is given by,

x_{\mathrm{oc}}=-2 \log≤ft\{\frac{L≤ft(θ_{\mathrm{o}}; \mathbf{X}_{\mathrm{1}},…, \mathbf{X}_{\mathrm{J}} \right)}{L≤ft(θ_{\mathrm{1}},…, θ_{\mathrm{J}}; \mathbf{X}_{\mathrm{1}},…, \mathbf{X}_{\mathrm{J}} \right)}\right\} .

The asymptotic null distribution of x_{\mathrm{oc}} follows a Chi-square with degrees of freedom equal to (J-1) (Wilks, 1938).

1. Note 1: The matrices in group.data must contain the same taxa, in the same order.

2. 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

  1 2 3 4 5 6 7 8 9 10 11  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) 

### Example output

Loading required package: dirmult

Attaching package: 'HMP'

The following object is masked from 'package:dirmult':

weirMoM

$Xoc statistics  106.7467$p value
 0


HMP documentation built on Aug. 31, 2019, 5:05 p.m.