estParams: estimate paramters from real datasets based on different...

View source: R/estimation.R

estParamsR Documentation

estimate paramters from real datasets based on different distribution assumptions

Description

Estimate paramters from real datasets based on different distribution assumptions including NB (Negative Binomial), ZINB (Zero-Inflated Negative Binomial), ZIP (Zero-Inflated Poisson) and Dirichlet-Multinomial Distribution (DM). The microbial correlation network can be provided or estimated from different methods including 'MAGMA','CCLasso','SparCC','SPIEC-EASI' and 'CCREPE'.

Usage

estParams(otu_table,Sigma=NULL,
	method=c('MAGMA','CCLasso','SparCC','SPIECEASI','CCREPE'),
	distrib=c('NB','ZINB','ZIP','DM'))

Arguments

x

taxon abundance matrix with rows as samples and columns as taxa

Sigma

correlation matrix among taxa

method

methods for inferring Sigma if not provided

distrib

distribution can be specified as 'NB','ZINB','ZIP' or 'DM'

Value

A list containing all parameters: dispersion (phi) and mean (mu) for NB; dispersion (phi), mean (mu) and zero inflation probability (p0) for ZINB; mean (mu) and zero inflation probability (p0) for ZIP; mean (mu) and dispersion (phi) for DM

Examples

 ## Not run: 
 library(powmic)
 x=params$otu.mat
 params=estParams(x,Sigma=NULL,method='CCLasso')
 library(rMAGMA)
 data(params)
 params=estParams(x,Sigma=NULL,method='MAGMA',distrib='NB')
 library(SpiecEasi)
 params=estParams(x,Sigma=NULL,method='SPIECEASI')
 params=estParams(x,Sigma=NULL,method='SparCC')
 library(ccrepe)
 params=estParams(x,Sigma=NULL,method='CCREPE')
 
## End(Not run)

lichen-lab/powmic documentation built on April 7, 2023, 4:40 p.m.