scaleMeanVarCurve {MAnorm2}R Documentation

Scale a Mean-Variance Curve

Description

scaleMeanVarCurve underlies other interface functions for estimating the variance ratio factor of an unadjusted mean-variance curve (or a set of unadjusted mean-variance curves).

Usage

scaleMeanVarCurve(z, m, d0)

Arguments

z

A list of which each element is a vector of FZ statistics corresponding to a bioCond object (see also "Details").

m

A vector of numbers of replicates in bioCond objects. Must correspond to z one by one in the same order.

d0

A positive real specifying the number of prior degrees of freedom of the mean-variance curve(s). Inf is allowed. Note that d0 is typically estimated via estimateD0.

Details

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 mean (plus a constant that depends on the number of prior degrees of freedom) of the FZ statistics of each single bioCond to get an estimate of log variance ratio factor.

The final estimate of log variance ratio factor is a weighted mean of estimates across bioCond objects, with the weights being their respective numbers of genomic intervals that are used to calculate FZ statistics. This should be appropriate, as Fisher's Z distribution is roughly normal (see also "References"). The weighted mean is actually a plain (unweighted) mean across all the involved genomic intervals.

Finally, we get an estimate of variance ratio factor by taking an exponential.

Value

The estimated variance ratio factor for adjusting the mean-variance curve(s). Note that the function returns NA if there are not sufficient genomic intervals for estimating it.

References

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.

See Also

bioCond for creating a bioCond object; fitMeanVarCurve for fitting a mean-variance curve; varRatio for a formal description of variance ratio factor; estimateD0 for estimating the number of prior degrees of freedom associated with a mean-variance curve (or a set of curves); estimatePriorDf for an interface to estimating the number of prior degrees of freedom on bioCond objects as well as adjusting their mean-variance curve(s) accordingly.

estimateD0Robust and scaleMeanVarCurveRobust for estimating number of prior degrees of freedom and variance ratio factor in a robust manner, respectively.


[Package MAnorm2 version 1.2.2 Index]