View source: R/getShrinkedDispersions.R
getShrinkedDispersions | R Documentation |
Use this function to shrink initial estimates of overdispersions towards a target value.
getShrinkedDispersions(obs, shrinkTarget = NULL, delta = NULL)
obs |
a numeric vector. Initial dispersion estimates for each feature. |
shrinkTarget |
a numeric value. Initial dispersion estimates are shrunk towards this value. If NULL, target value is estimated from the initial dispersion estimates. See notes. |
delta |
a numeric value. This is the weight that is used within the shrinkage algorithm. If 0, no shrinkage is performed on initial values. If equals 1, initial values are forced to be shrunken to the target value. If NULL, weights are automatically estimated from the initial dispersion estimates. |
a list with the elements of initial and adjusted (shrunken) dispersion estimates, shrinkage target, and weights that are used to shrink towards the target value. See the related paper for detailed information on shrinkage algorithm (Yu et al., 2013).
initial |
initial dispersion estimates using the method-of-moments. |
adj |
shrunken dispersion estimates. |
cmp |
the means and variances of initial estimates. |
delta |
a weight used for shrinkage estimates. See Yu et al. (2013) for details. |
target |
shrinkage target for initial dispersion estimates. |
This function is modified from the source codes of getAdjustDisp
function in the sSeq Bioconductor package.
Dincer Goksuluk
Yu, D., Huber, W., & Vitek, O. (2013). Shrinkage estimation of dispersion in Negative Binomial models for RNA-seq experiments with small sample size. Bioinformatics, 29(10), 1275-1282.
getT
, getAdjustDisp
set.seed(2128) initial <- runif(10, 0, 4) getShrinkedDispersions(initial, 0) # shrink towards 0. getShrinkedDispersions(initial, 0, delta = 1) # force to shrink 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.