estimateD0 underlies other interface functions for assessing
the goodness of fit of an unadjusted mean-variance curve (or a set of
unadjusted mean-variance curves).
estimateD0(z, m)The estimated number of prior degrees of freedom. Note that the
function returns NA if there are not sufficient genomic intervals
for estimating it.
A list of which each element is a vector of FZ statistics
corresponding to a bioCond object (see also "Details").
A vector of numbers of replicates in bioCond
objects. Must correspond to z one by one in the same
order.
For each bioCond object with replicate samples, a vector of
FZ statistics can be deduced from the unadjusted mean-variance curve
associated with it. More specifically, for each genomic interval in a
bioCond with replicate samples, its FZ statistic is defined to be
\(log(t_hat / v0)\), where \(t_hat\) is the observed variance of signal
intensities of the interval, and \(v0\) is the interval's prior variance
read from the corresponding mean-variance curve.
Theoretically, each FZ statistic follows a scaled Fisher's Z distribution
plus a constant (since the mean-variance curve is not adjusted yet), and we
can use the sample variance (plus a constant) of the FZ statistics
of each single bioCond to get an estimate of
\(trigamma(d0 / 2)\),
where \(d0\) is the number of prior degrees of freedom
(see also trigamma).
The final estimate of \(trigamma(d0 / 2)\) is a weighted mean of estimates
across bioCond objects, with the weights being their respective
numbers of genomic intervals minus 1 that
are used to deduce the FZ statistics.
This should be appropriate, as Fisher's Z distribution is roughly normal
(see also "References"). The weighted mean is similar to the pooled sample
variance in an ANOVA analysis.
Finally, an estimate of \(d0\) can be obtained by taking the inverse of \(trigamma\) function, which is achieved by applying Newton iteration to it. Note that \(d0\) is considered to be infinite if the estimated \(trigamma(d0 / 2)\) is less than or equal to 0.
Smyth, G.K., Linear models and empirical bayes methods for assessing differential expression in microarray experiments. Stat Appl Genet Mol Biol, 2004. 3: p. Article3.
Tu, S., et al., MAnorm2 for quantitatively comparing groups of ChIP-seq samples. Genome Res, 2021. 31(1): p. 131-145.
bioCond for creating a bioCond object;
fitMeanVarCurve for fitting a mean-variance curve;
estimatePriorDf for an interface to estimating the
number of prior degrees of freedom on bioCond objects;
varRatio for a description of variance ratio factor;
scaleMeanVarCurve for estimating the variance ratio factor
for adjusting a mean-variance curve (or a set of curves).
estimateD0Robust and scaleMeanVarCurveRobust
for estimating number of prior degrees of freedom and variance ratio
factor in a robust manner, respectively.