mixed.gamma.estimation: Estimate the mixed gamma distribution of the mean values

View source: R/expression_fit.R

mixed.gamma.estimationR Documentation

Estimate the mixed gamma distribution of the mean values

Description

The estimated distribution will be a mixture of a zero component and two left zensored gamma distributions, using an em fitting procedure implemented in the package. It is recommended to reduce the total number of fitted genes (often in the count matrix a huge fraction of zero genes) using the parameter num.genes.kept.

Usage

mixed.gamma.estimation(
  mean.vals,
  censoredPoint = NULL,
  num.genes.kept = 21000,
  proportion.values = NULL,
  return.df = TRUE
)

Arguments

mean.vals

Vector with all normalized mean values (estimated using nbinom.estimation)

censoredPoint

Censoring point for left censored gamma distributions (if not set, the minimal positive value will be chosen)

num.genes.kept

Total number of genes used for the fit (remove additional genes with a mean of 0)

proportion.values

Possibility to initialize the proportion values for the first component (zero component) and the third component (second gamma distribution) with a numeric vector of length 2. Default setting the proportion of the first component to 25% of all zero values and the proportion of the third component to 5%.

return.df

If true return data frame with fitted parameters, otherwise an object of class EMResult (containing also the loglikelihoods)

Value

Data frame with the six parameters describing the gamma mixed distributions


heiniglab/scPower documentation built on Jan. 9, 2025, 12:13 p.m.