assist.NB: Negative Binomial Test For OTUID or Taxon

Description Usage Arguments Value Author(s) Examples

Description

This function does negative binomial test for a given otuID or taxon

Usage

1
2
assist.NB(data, meta, is.OTU=TRUE, rank=NULL, meta.factors=NULL,
          anov.fac=NULL, taxon="")

Arguments

data

an ecology data set to be analyzed.

meta

the metadata table to be analyzed.

is.OTU

logical. If an OTU table was provided, is.OTU should be set as TRUE; otherwise, it should be set as FALSE.

rank

optional. If no rank was provided, the data will be used as it is, if rank is provided, if data is an OTU table, it will be converted to taxonomic abundance matrix at the given rank, no change will be made for a data that has already been a taxonomic abundance matrix. See also tax.abund and data.revamp

meta.factors

optional. If provided, will only test the model on selected metadata variables; otherwise, will test all variables in the metadata table.

anov.fac

optional. Whether or not to do anova test on a metadata variable.

taxon

a length one charactor. Can either be an otuID or a taxon name.

Value

This function return a list of outputs of the negative bionomial modeling for a selected otuID or taxa. Members of this output list are: "NB.model", "tax.met", "taxon", "factors", "anova".

NB.model

is the negative bionomial model

tax.met

is a dataframe with combined the taxon and metadata

taxon

is either a taxon name or in LCA_otuID format, see also LCA.OTU

factors

shows which metadata variable had significant impact

anova

shows anova test of a metadata variable, this will not be available if anov.fac is NULL

Author(s)

Wen Chen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(ITS1, meta)
m <- meta[, c(2,3,5,7)]
## Not run: 
# for usage demonstration purpose only, may not fit the negative
# binomial distribution model.
nb <- assist.NB(ITS1, meta=m, rank="g", 
                anov.fac="Harvestmethod",
                taxon=rownames(ITS1)[1])

## End(Not run)

RAM documentation built on May 2, 2019, 3:04 p.m.