fitNL: Fit Normal Mixture Model The function fits a two-component...

Description Usage Arguments Details Value References

View source: R/siberRaw2.R

Description

The parameter estimates from log normal mixture is obtained by taking logarithm and fit normal mixture. We use mclust package to obtain parameter estimates of normal mixture model. In particular, log_{base}(\frac{y+eps}{d}) is used to fit to normal mixture model.

Usage

1
fitNL(y, d = NULL, model = "E")

Arguments

y

A vector representing the RNAseq raw count.

d

A vector of the same length as y representing the normalization constant to be applied to the data. For the LN model, the original data would be devided by this vector.

model

Character specifying E or V model. E model fits the mixture model with equal variance while V model doesn't put any constraint.

Details

With this function, three models can be fitted: (1) log normal mixture with equal variance (E model); (2) Generalized Poisson mixture with unequal variance (V model); (3) 0-inflated log normal model. The 0-inflated log normal has the following density function:

P(Y=y)=π D(y) + (1-π)LN(μ, σ) where D is the point mass at 0 while LN(μ, σ) is the density of log normal distribution with mean μ and variance σ^2.

The rule to fit 0-inflated model is that the observed percentage of count exceeds the user specified threshold. This rule overrides the model argument (E or V) when observed percentae of zero count exceeds the threshold.

Value

A vector consisting parameter estimates of mu1, mu2, sigma1, sigma2, pi1, logLik and BIC.

References

Tong, P., Chen, Y., Su, X. and Coombes, K. R. (2012). Systematic Identification of Bimodally Expressed Genes Using RNAseq Data. Bioinformatics, submitted.


nickytong/SIBER documentation built on May 23, 2019, 5:08 p.m.