## S3 method for class 'DGEList':
estimateTagwiseDisp(y, prior.df=10, trend="movingave", span=NULL, method="grid",
grid.length=11, grid.range=c(-6,6), tol=1e-06, verbose=FALSE, ...)
## S3 method for class 'default':
estimateTagwiseDisp(y, group=NULL, lib.size=NULL, dispersion, AveLogCPM=NULL,
prior.df=10, trend="movingave", span=NULL, method="grid", grid.length=11,
grid.range=c(-6,6), tol=1e-06, verbose=FALSE, ...)
DGEList
object."movingave"
(default), "loess"
and "none"
."grid"
(default) for interpolation on grid points or "optimize"
to call the function of the same name.method="grid"
, the number of points on which the interpolation is applied for each tag.method="grid"
, the range of the grid points around the trend on a log2 scale.method="optimize"
, the tolerance for Newton-Rhapson iterations.TRUE
then diagnostic ouput is produced during the estimation process.estimateTagwiseDisp.DGEList
adds the following components to the input DGEList
object:estimateTagwiseDisp.default
returns a numeric vector of the tagwise dispersion estimates.trend="none"
, then the prior dispersion is just a constant, the common dispersion.
Otherwise, the trend is determined by a moving average (trend="movingave"
) or loess smoother applied to the tagwise conditional log-likelihood.
method="loess"
applies a loess curve of degree 0 as implemented in loessByCol
.
method="optimize"
is not recommended for routine use as it is very slow.
It is included for testing purposes.
Note that the terms `tag' and `gene' are synonymous here. The function is only named `Tagwise' for historical reasons.estimateCommonDisp
is usually run before estimateTagwiseDisp
.
movingAverageByCol
and loessByCol
implement the moving average or loess smoothers.# True dispersion is 1/5=0.2
y <- matrix(rnbinom(250*4,mu=20,size=5),nrow=250,ncol=4)
dge <- DGEList(counts=y,group=c(1,1,2,2))
dge <- estimateCommonDisp(dge)
dge <- estimateTagwiseDisp(dge)
Run the code above in your browser using DataLab