## S3 method for class 'DGEList':
estimateDisp(y, design=NULL, prior.df=NULL, trend.method="locfit", mixed.df=FALSE,
tagwise=TRUE, span=NULL, min.row.sum=5, grid.length=21, grid.range=c(-10,10), robust=FALSE,
winsor.tail.p=c(0.05,0.1), tol=1e-06, ...)
## S3 method for class 'default':
estimateDisp(y, design=NULL, group=NULL, lib.size=NULL, offset=NULL, prior.df=NULL,
trend.method="locfit", mixed.df=FALSE, tagwise=TRUE, span=NULL, min.row.sum=5, grid.length=21,
grid.range=c(-10,10), robust=FALSE, winsor.tail.p=c(0.05,0.1), tol=1e-06, weights=NULL, ...)
DGEList
object.prior.n
."none"
, "movingave"
, "loess"
and "locfit"
(default).trend.method="locfit"
. If FALSE
, locfit
uses a polynomial of degree 0. If TRUE
, locfit
uses a polynomial of degree 1 for lowly expressed genes. Care is taken to smooth the curve.prior.df
be robustified against outliers?prior.df
.optimize
glmFit
. Defaults to the log-effective library sizes.estimateDisp.DGEList
adds the following components to the input DGEList
object:tagwise=TRUE
.y
.estimateDisp.default
returns a list containing common.dispersion
, trended.dispersion
, tagwise.dispersion
(if tagwise=TRUE
), span
, prior.df
and prior.n
.estimateCommonDisp
and estimateTagwiseDisp
. If a design matrix is given, it calculates the adjusted profile log-likelihood for each tag and then maximizes it. In this case, it is similar to the functions estimateGLMCommonDisp
, estimateGLMTrendedDisp
and estimateGLMTagwiseDisp
.Note that the terms `tag' and `gene' are synonymous here.
Phipson, B, Lee, S, Majewski, IJ, Alexander, WS, and Smyth, GK (2016).
Robust hyperparameter estimation protects against hypervariable genes and improves power to detect differential expression.
Annals of Applied Statistics 10.
estimateCommonDisp
, estimateTagwiseDisp
, estimateGLMCommonDisp
, estimateGLMTrendedDisp
, estimateGLMTagwiseDisp
# True dispersion is 1/5=0.2
y <- matrix(rnbinom(1000, mu=10, size=5), ncol=4)
group <- c(1,1,2,2)
design <- model.matrix(~group)
d <- DGEList(counts=y, group=group)
d1 <- estimateDisp(d)
d2 <- estimateDisp(d, design)
Run the code above in your browser using DataLab