comp.B: Computing B-statistics for Differential Expression

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

View source: R/DEDS.R

Description

comp.B returns a function of one argument with bindings for L and proportion. This function accepts a microarray data matrix as its single argument, when evaluated, computes lod-odds of differential expression by empirical Bayes shrinkage of the standard error toward a common value. The lod-odds are sometimes called B statistics.

Usage

1
comp.B(L = NULL, proportion = 0.01)

Arguments

L

A vector of integers corresponding to observation (column) class labels. For k classes, the labels must be integers between 0 and k-1.

proportion

A numeric variable specifying the proportion of differential expression.

Details

The function returned by comp.B calculates B statistics for each row of the microarray data matrix, with bindings for L and proportion. It interfaces to a C function. comp.stat is another function that wraps around the same C function that could be used for computing B statistics (see examples below).

Value

comp.B returns a function (F) with the bindings for L and proportion . The function F when supplied with a microarray data matrix and evaluated will return a numeric vector of B statistics for each row of the matrix.

Author(s)

Yuanyuan Xiao, yxiao@itsa.ucsf.edu,
Jean Yee Hwa Yang, jeany@maths.usyd.edu.au.

References

Lonnstedt, I. and Speed, T. P. (2002). Replicated microarray data. Statistica Sinica 12, 31-46.

Smyth, G. K. (2003). Linear models and empirical Bayes methods for assessing differential expression in microarray experiments. http://www.statsci.org/smyth/pubs/ebayes.pdf

See Also

comp.modt,comp.stat.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
X <- matrix(rnorm(1000,0,0.5), nc=10)
L <- rep(0:1,c(5,5))

# genes 1-10 are differentially expressed
X[1:10,6:10]<-X[1:10,6:10]+1

# compute B statistics, proportion set as 0.01
B.fun <- comp.B(L)
B.X <- B.fun(X)

# compute B statistics, proportion set as 0.1
B.fun <- comp.B(L, proportion=0.1)
B.X <- B.fun(X)

# Another way of computing B statistics
B.X<- comp.stat(X, L, "B")

DEDS documentation built on Oct. 31, 2019, 3:15 a.m.

Related to comp.B in DEDS...