ZIdtmReg: Fit the Zero-inflated Dirichlet-tree multinomial (ZIDTM)...

View source: R/ZIdtmReg.R

ZIdtmRegR Documentation

Fit the Zero-inflated Dirichlet-tree multinomial (ZIDTM) regression.

Description

Fit the Zero-inflated Dirichlet-tree multinomial (ZIDTM) regression.

Usage

ZIdtmReg(
  otu.tab,
  X.mean,
  X.disp = NULL,
  X.zero = NULL,
  tree,
  test.type = "Mean",
  index = 1
)

Arguments

otu.tab

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

X.mean

a data frame or matrix containing the covariates link to the mean parameter. Rows of the matrix represent observations.

X.disp

a data frame or matrix containing the covariates link to the dispersion parameter. Rows of the matrix represent observations.

X.zero

a data frame or matrix containing the covariates link to the zero prevalance. Rows of the matrix represent observations.

tree

the phylogenetic tree

test.type

f test.type = "Mean", the function will test for differential mean (Default). If test.type = "Disp", the function will test for differential dispersion. If test.type = "Freq", the function will test for differential presence-absence frequency.

index

index position for the interest variable for testing and remain treat as confounders.

Value

Returns a list, containing testing results of each subtree.

References

Zhou, C., Zhao, H., and Wang, T.: Transformation and differential abundance analysis of microbiome data incorporating phylogeny. Bioinformatics btab543, https://doi.org/10.1093/bioinformatics/btab543 (2021).

Examples

library(phyloseq)
data("combo.phyloseq.obj")
otu.tab <- t(otu_table(combo.phyloseq.obj))
tree <- phy_tree(combo.phyloseq.obj)
sodium <- sample_data(combo.phyloseq.obj)$sodium
fit <- ZIdtmReg(otu.tab, sodium, tree=tree)

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