getShrinkedDispersions {NBLDA}R Documentation

Estimate Shrinked Overdispersions

Description

Use this function to shrink initial estimates of overdispersions towards a target value.

Usage

getShrinkedDispersions(obs, shrinkTarget = NULL, delta = NULL)

Arguments

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.

Value

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.

Note

This function is modified from the source codes of getAdjustDisp function in the sSeq Bioconductor package.

Author(s)

Dincer Goksuluk

References

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.

See Also

getT, getAdjustDisp

Examples

set.seed(2128)
initial <- runif(10, 0, 4)

getShrinkedDispersions(initial, 0)  # shrink towards 0.
getShrinkedDispersions(initial, 0, delta = 1)  # force to shrink 0.


[Package NBLDA version 1.0.1 Index]