C.alpha.multinomial {HMP}R Documentation

C(α)C(\alpha) - Optimal Test for Assessing Multinomial Goodness of Fit Versus Dirichlet-Multinomial Alternative

Description

A function to compute the C(α)C(\alpha)-optimal test statistics of Kim and Margolin (1992) for evaluating the Goodness-of-Fit of a Multinomial distribution (null hypothesis) versus a Dirichlet-Multinomial distribution (alternative hypothesis).

Usage

C.alpha.multinomial(data)

Arguments

data

A matrix of taxonomic counts(columns) for each sample(rows).

Details

In order to test if a set of ranked-abundance distribution(RAD) from microbiome samples can be modeled better using a multinomial or Dirichlet-Multinomial distribution, we test the hypothesis H:θ=0\mathrm{H}: \theta = 0 versus H:θ0\mathrm{H}: \theta \ne 0, where the null hypothesis implies a multinomial distribution and the alternative hypothesis implies a DM distribution. Kim and Margolin (Kim and Margolin, 1992) proposed a C(α)C(\alpha)-optimal test- statistics given by,

T=j=1Ki=1P1i=1Pxij(xijNii=1PxijNg)2T = \sum_{j=1}^{K} \sum_{i=1}^{P} \frac{1}{\sum_{i=1}^{P} x_{ij}}\left (x_{ij}-\frac{N_{i}\sum_{i=1}^{P} x_{ij}}{N_{\mathrm{g}}} \right )^2

Where KK is the number of taxa, PP is the number of samples, xijx_{ij} is the taxon jj, j=1,,Kj = 1,\ldots,K from sample ii, i=1,,Pi=1,\ldots,P, NiN_{i} is the number of reads in sample ii, and NgN_{\mathrm{g}} is the total number of reads across samples.

As the number of reads increases, the distribution of the TT statistic converges to a Chi-square with degrees of freedom equal to (P1)(K1)(P-1)(K-1), when the number of sequence reads is the same in all samples. When the number of reads is not the same in all samples, the distribution becomes a weighted Chi-square with a modified degree of freedom (see (Kim and Margolin, 1992) for more details).

Note: Each taxa in data 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 C(α)C(\alpha)-optimal test statistic and p-value.

References

Kim, B. S., and Margolin, B. H. (1992). Testing Goodness of Fit of a Multinomial Model Against Overdispersed Alternatives. Biometrics 48, 711-719.

Examples

	data(saliva)
	
	calpha <- C.alpha.multinomial(saliva)
	calpha

[Package HMP version 2.0.1 Index]