estimateCommonDisp(object, tol=1e-06, rowsum.filter=5, verbose=FALSE)
DGEList
objectoptimize
TRUE
estimated dispersion and BCV will be printed to standard output.object
with the following added components:
equalizeLibSizes
is called to adjust the counts using a quantile-to-quantile method, but this requires a fixed value for the common dispersion parameter. To obtain a good estimate for the common dispersion, pseudocounts are calculated under the Poisson model (dispersion is zero) and these pseudocounts are used to give an estimate of the common dispersion. This estimate of the common dispersion is then used to recalculate the pseudocounts, which are used to provide a final estimate of the common dispersion.
equalizeLibSizes
# True dispersion is 1/5=0.2
y <- matrix(rnbinom(1000,mu=10,size=5),ncol=4)
d <- DGEList(counts=y,group=c(1,1,2,2),lib.size=c(1000:1003))
d <- estimateCommonDisp(d, verbose=TRUE)
Run the code above in your browser using DataLab