MGLMdtmReg: Fit the Dirichlet-tree multinomial (DTM) regression.

View source: R/MGLMdtmReg.R

MGLMdtmRegR Documentation

Fit the Dirichlet-tree multinomial (DTM) regression.

Description

Fit the Dirichlet-tree multinomial (DTM) regression.

Usage

MGLMdtmReg(otu.tab, X, tree)

Arguments

otu.tab

a data frame or matrix containing the count data. Rows of the matrix represent observations and columns are the taxa.

X

a data frame or matrix containing the covariates. Rows of the matrix represent observations.

tree

the phylogenetic tree.

Value

Returns a list of MGLM objects ('MGLMreg') corresponding to internal nodes of the tree.

References

Wang, T., Zhao, H.: A Dirichlet-tree multinomial regression model for associating dietary nutrients with gut microorganisms. Biometrics 73(3), 792–801 (2017).

Examples

library(phyloseq)
otu.tab <- t(otu_table(combo.phyloseq.obj))
tree <- phy_tree(combo.phyloseq.obj)
sodium <- sample_data(combo.phyloseq.obj)$sodium
fit <- MGLMdtmReg(otu.tab, sodium, tree)
Extract_logL(fit)

liudoubletian/phyloMDA documentation built on April 28, 2022, 6:51 p.m.