dispCoxReidSplineTrend(y, design, offset=NULL, df = 5, subset=10000, AveLogCPM=NULL, method.optim="Nelder-Mead", trace=0)
dispCoxReidPowerTrend(y, design, offset=NULL, subset=10000, AveLogCPM=NULL, method.optim="Nelder-Mead", trace=0)
adjustedProfileLik
the offset
must be a matrix with the same dimension as the table of counts.ns
in the splines package.cutWithMinN
.optim
. See optim
for more detail.dispersion
and abundance
containing the estimated dispersion and abundance for each gene.
The vectors are of the same length as nrow(y)
.
edgeR
context, these are low-level functions called by estimateGLMTrendedDisp
.dispCoxReidSplineTrend
and dispCoxReidPowerTrend
fit abundance trends to the genewise dispersions.
dispCoxReidSplineTrend
fits a regression spline whereas dispCoxReidPowerTrend
fits a log-linear trend of the form a*exp(abundance)^b+c
.
In either case, optim
is used to maximize the adjusted profile likelihood (Cox and Reid, 1987).
estimateGLMTrendedDisp
design <- matrix(1,4,1)
y <- matrix((rnbinom(400,mu=100,size=5)),100,4)
d1 <- dispCoxReidSplineTrend(y, design, df=3)
d2 <- dispCoxReidPowerTrend(y, design)
with(d2,plot(AveLogCPM,sqrt(dispersion)))
Run the code above in your browser using DataLab