Learn R Programming

DirichletMultinomial (version 1.14.0)

dmn: Fit Dirichlet-Multinomial models to count data.

Description

Fit Dirichlet-Multinomial models to a sample x taxon count matrix.

Usage

dmn(count, k, verbose = FALSE, seed = runif(1, 0, .Machine$integer.max))

Arguments

count
matrix() of sample x taxon counts.
k
integer(1), the number of Dirichlet components to fit.
verbose
logical(1) indicating whether progress in fit should be reported.
seed
numeric(1) random number seed.

Value

An object of class dmn, with elements (elements are usually retrieved via functions defined in the package, not directly).
GoodnessOfFit
NLE, LogDet, Laplace, AIC, and BIC criteria assessing goodness-of-fit.
Group
matrix of dimension samples x k, providing the Dirichlet parameter vectors.
Mixture
Weight
numeric() of length k, with relative weight of each component.
Fit
Lower
matrix() of dimension taxa x k with 95% lower bounds on Dirichlet component vector estimates.
Estimate
matrix() of dimension taxa x k with Dirichlet component vector estimates.
Upper
matrix() of dimension taxa x k with 95% upper bounds on Dirichlet component vector estimates.

Details

This implements Dirichlet-multinomial mixture models describe in the package help page, DirichletMultinomial-package.

References

Holmes I, Harris K, Quince C, 2012 Dirichlet Multinomial Mixtures: Generative Models for Microbial Metagenomics. PLoS ONE 7(2): e30126. doi:10.1371/journal.pone.0030126.

See Also

DirichletMultinomial-package, vignette("DirichletMultinomial")

Examples

Run this code
data(fit)
## k = 1:7; full example in vignette
lplc <- sapply(fit, laplace)
plot(lplc, type="b")
fit[[which.min(lplc)]]

Run the code above in your browser using DataLab