setParams | R Documentation |
Four functions for setting parameters for different distributions including Negative Binomial Distribution (NB), Zero-Inflated Negative Binomial Distribution (ZINB), Zero-Inflated Poisson Distribution (ZIP) and Dirichlet-Multinomial Distribution (DM)
setParams.NB(nTaxa=1000,p.DA=0.05,Sigma=Sigma,lmu0=lmu0,lphi0=lphi0,lfc.mu=2,depth=1,sim.seed=123456)
setParams.ZINB(nTaxa=1000,p.DA=0.05,Sigma=Sigma,lmu0=lmu0,lphi0=lphi0,lp0=lp0,lfc.mu=2,depth=1,sim.seed=123456)
setParams.ZIP(nTaxa=1000,p.DA=0.05,Sigma=Sigma,lmu0=lmu0,lp0=lp0,lfc.mu=2,depth=1,sim.seed=123456)
setParams.DM(nTaxa=1000,p.DA=0.05,lmu0=lmu0,lphi0=lphi0,lfc.mu=2,libsize=5000,depth=1,sim.seed=123456)
nTaxa |
Number of Taxa in the simulation. If |
p.DA |
Proportion of Differential Abundant (DA) Taxa |
Sigma |
Estimated microbial correlation matrix when the distribution is "NB", ZINB" or "ZIP" |
lmu0 |
logarithmic mean abundance parameter |
lphi0 |
logarithmic dispersion parameter |
lp0 |
logarithmic zero-inflated probability when the distribution is "ZINB" and "ZIP" |
lfc.mu |
logarithmic fold change of DA Taxa. Default is 2 |
depth |
Depth factor. depth is multiplied to |
libsize |
Sequence depth when the distribution is "DM" |
sim.seed |
Simulation seed. Default is 123456 |
A list containing all parameters in the arguments
## Not run:
library(powmic)
distrib='NB'
setParams=switch(distrib,ZIP=setParams.ZIP, NB=setParams.NB, ZINB=setParams.ZINB)
data(params)
lmu0=log(params$mu)
lphi0=log(params$phi)
Sigma=params$Sigma
sim.params=setParams(Sigma=Sigma,lmu0=lmu0,lphi0=lphi0)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.