## S3 method for class 'DGEList':
estimateGLMTagwiseDisp(y, design=NULL, prior.df=10,
trend=!is.null(y$trended.dispersion), span=NULL, ...)
## S3 method for class 'default':
estimateGLMTagwiseDisp(y, design=NULL, offset=NULL, dispersion,
prior.df=10, trend=TRUE, span=NULL, AveLogCPM=NULL,
weights=NULL, \dots)
DGEList
object.glmFit
.TRUE
) or the common dispersion (FALSE
)?glmFit
. Defaults to the log-effective library sizes.dispCoxReidInterpolateTagwise
.estimateGLMTagwiseDisp.DGEList
produces a DGEList
object, which contains the tagwise dispersion parameter estimate for each tag for the negative binomial model that maximizes the Cox-Reid adjusted profile likelihood. The tagwise dispersions are simply added to the DGEList
object provided as the argument to the function.estimateGLMTagwiseDisp.default
returns a vector of the tagwise dispersion estimates.
The prior degrees of freedom determines the weight given to the global dispersion trend. The larger the prior degrees of freedom, the more the tagwise dispersions are squeezed towards the global trend.
Note that the terms `tag' and `gene' are synonymous here. The function is only named `Tagwise' for historical reasons.
This function calls the lower-level function dispCoxReidInterpolateTagwise
.
McCarthy, DJ, Chen, Y, Smyth, GK (2012). Differential expression analysis of multifactor RNA-Seq experiments with respect to biological variation.
Nucleic Acids Research 40, 4288-4297.
estimateGLMCommonDisp
for common dispersion or estimateGLMTrendedDisp
for trended dispersion in the context of a generalized linear model.estimateCommonDisp
for common dispersion or estimateTagwiseDisp
for tagwise dispersions in the context of a multiple group experiment (one-way layout).
y <- matrix(rnbinom(1000,mu=10,size=10),ncol=4)
d <- DGEList(counts=y,group=c(1,1,2,2),lib.size=c(1000:1003))
design <- model.matrix(~group, data=d$samples) # Define the design matrix for the full model
d <- estimateGLMTrendedDisp(d, design, min.n=10)
d <- estimateGLMTagwiseDisp(d, design)
summary(d$tagwise.dispersion)
Run the code above in your browser using DataLab