comp.SAM returns a function of one argument. This function has a
environment with bindings for a series of arguments (see below). It
accepts a microarray data matrix as its single argument, when
evaluated, computes SAM statistics for each row of the matrix.
comp.SAM(L = NULL, prob = 0.5, B = 200, stat.only = TRUE, verbose = FALSE,
deltas, s.step=0.01, alpha.step=0.01, plot.it=FALSE)NULL, $s_0$ is calculated using the
algorithm by Tusher et al. (see reference).B should be 0 (zero) or any number not less than the total
number of permutations.TRUE, only statistics
are calculated and returned; if FALSE, false discovery rates
(FDRs) for a set of $delta$(deltas) are
calculated and returned.TRUE, informative messages
are printed during the computation process.TRUE, a plot between the
coefficient of variation and the percentile sequence will be made.SAM returns a function (F) with bindings for a series of arguments.
When stat.only=T, the function F when evaluated returns a
numeric vector of SAM statistics;
When stat.only=F, the function F when evaluated returns
a list of the following components:
comp.SAM calculates SAM statistics for
each row of the microarray data matrix, with bindings for L,
prob, B, stat.only, verbose,
deltas, s.step, alpha.step and plot.it. If
quantile=NULL, the fudge factor $s_0$ is calculated as the
percentile of the gene-wise standard deviations that minimizes the
coefficient of variation of the statistics; otherwise $s_0$ is set
as the specified percentile of standard deviations. If
stat.only=T, only SAM statistics are returned; otherwise,
permutation will be carried out to calculate the FDRs for a set of
deltas specified and a FDR table will be returned in addition
to the SAM statistics.
comp.tX <- 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
# two sample test, statistics only
sam.fun <- comp.SAM(L)
sam.X <- sam.fun(X)
# two sample test, FDR
sam.fun <- comp.SAM(L, stat.only=FALSE, delta=c(0.1, 0.2, 0.5))
sam.X <- sam.fun(X)
Run the code above in your browser using DataLab