getShrinkedDispersions: Estimate Shrinked Overdispersions

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/getShrinkedDispersions.R

Description

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

Usage

1
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 shrinked towards this value. If NULL, target value is estimated from initial dispersion estimates. See notes.

delta

a numeric value. This is the weight that is used for shrinkage algorithm. If 0, no shrinkage is performed on intiial values. If equals 1, initial values are forced to shrinked to target value. If NULL, weight are automatically estimated from initial disperson estimates.

Value

a list with elements of initial and adjusted (shrinked) dispersion estimates, shrinkage target and weight that is used to shrink towards target value. See related paper for detailed information on shrinkage algorithm (Yu et. al., 2013).

initial

initial estimates for dispersions estimated from method-of-momnets.

adj

shrinked dispersion estimates.

cmp

mean and variance 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 using source code from getAdjustDisp.

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

1
2
3
4
5
set.seed(2128)
initial <- runif(10, 0, 4)

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

NBLDA documentation built on May 2, 2019, 12:21 p.m.