**20**wrote:

Within the function `momentsDisEstimate()`

of `DESeq2`

a rough method-of-moments estimate of the mean counts is derived by this equation `(bv - xim*bm)/bm^2`

. (I am aware that this is just an initial set to maximize Cox-Reid adjusted likelihood of the gene-wise dispersion estimat.)

So I was curious and tried to calculate the MoME myself - but I always came to something looking like the inverse of it.

Unfortunately I am not aware how to write mathematical formulas on the support bioconductor page. Thats why I formulated a question on:

https://stats.stackexchange.com/questions/399685/deseq2-method-of-moments-negative-binomial

`momentsDispEstimate <- function(object) {`

`xim <- if (!is.null(normalizationFactors(object))) {`

`mean(1/colMeans(normalizationFactors(object)))}`

`else { mean(1/sizeFactors(object)) }`

`bv <- mcols(object)$baseVar`

`bm <- mcols(object)$baseMean`

`(bv - xim*bm)/bm^2 }`

Thank you for your time and answer.

**23k**• written 7 weeks ago by Fischer-philipp •

**20**