Description Usage Arguments Details Value Author(s)
Fit each gene expression by a zero-inflated censored normal distribution by direct maximize the log-likelihood and return MLE of mean, variance and probability of mixture component.
1 2 3 4 5 6 7 8 9 | ztruncnorm(
dat,
cutoff = 0.1,
iter = 200,
s_upper = 4,
s_lower = 0.1,
p_min = 0.6,
p_max = 1
)
|
dat |
Data matrix. |
cutoff |
The value below cutoff is treated as no expression. Default = 0.1. |
iter |
Max number of iteration for optimization. Default = 100. |
s_upper |
upper bound of standard deviation. Default = 4. |
s_lower |
lower bound of standard deviation. Default = 0.1. |
p_min |
lower bound of the probability of the normal component. Default = 0.6. |
p_max |
upper bound of the probability of the normal component. Can be either a scaler or a vector. If it is a vector, each element is the upper bound for a gene. Default = 1. |
It will return NA if number of nonzero is less than 4 indicating that the gene has no expression or if the optimization is not convergence or error which will be filled with sample mean and std, p_max afterwards.
ztruncnorm
returns a list of results in the following order.
paramA matrix with mean and standard deviation for each gene.
pgA vector for the probablity of the normal component.
Zhirui Hu, zhiruihu@g.harvard.edu
Songpeng Zu, songpengzu@g.harvard.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.