dmngroup: Dirichlet-Multinomial generative classifiers.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/dmngroup.R

Description

Fit Dirichlet-Multinomial generative classifiers to groups (rows) within a sample x taxon count matrix.

Usage

1
2
dmngroup(count, group, k, ..., simplify = TRUE,
    .lapply = parallel::mclapply)

Arguments

count

matrix() of sample x taxon counts.

group

factor() or vector to be coerced to a factor, with as many elements as there are rows in count, indicating the group to which the corresponding sample belongs.

k

integer(), the number(s) of Dirichlet components to fit.

...

Additional arguments, passed to dmn.

simplify

Return only the best-fit model for each group?

.lapply

An lapply-like function for application of group x k fits.

Details

This function divided count into groups defined by group, creates all combinations of group x k, and evaluates each using dmn. When simplify=TRUE, the best (Laplace) fit is selected for each group.

Value

An object of class dmngroup, a list of fitted models of class dmn. When simplify=TRUE, elements are named by the group to which they correspond.

Author(s)

Martin Morgan mailto:mtmorgan@fhcrc.org

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

dmn, DirichletMultinomial-package, vignette("DirichletMultinomial")

Examples

1
2
3
4
5
6
7
8
## best fit for groups 'Lean' and 'Obese'; full example in vignette.
## Not run: bestgrp <- dmngroup(count, pheno, k=1:5, verbose=TRUE, 
                    mc.preschedule=FALSE)

## End(Not run)
data(bestgrp)
bestgrp
bestgrp[["Obese"]]

DirichletMultinomial documentation built on Nov. 8, 2020, 7 p.m.