DESeq2 models the counts of a gene as Kj ~ NB(μj, α) with log μj = log sj + ln 2 · xjTβ. The coefficients are found by iteratively reweighted least squares: weights wj = μj/(1 + αμj), working response zj = ηj − log sj + (kj − μj)/μj. The Wald test uses the curvature at the maximum, the likelihood ratio test the drop of the profile likelihood; a normal prior on the fold change turns the fit into a ridge regression and shrinks noisy genes towards zero.
code/ch08_count_data_glm.R (nb_irls, shrink_curves).