matrixT {ClassComparison}R Documentation

Multiple T Tests by Matrix Multiplication

Description

Utility functions for computing vectors of row-by-row means, variances, and t-statistics.

Usage

matrixMean(x)
matrixVar(x, xmean)
matrixT(m, v)

Arguments

x a matrix
xmean a numeric vector or single-column matrix
m a matrix
v a logical vector of length eual to the number of columns of m

Value

matrixMean returns a single-column matrix containing the row-by-row means of x.
matrixVar returns a signle-column matrix containing the row-by-row means of x, assuming that xmean contains the corresponding mean values.
matrixT returns a single-column matrix of t-statistics from a two-sample t-test comparing the columns for which v is true to those for which v is false.

Author(s)

Kevin R. Coombes <kcoombes@mdanderson.org>

See Also

MultiTtest

Examples

ng <- 1000
ns <- 50
dat <- matrix(rnorm(ng*ns), ncol=ns)
clas <- factor(rep(c('Good', 'Bad'), each=25))
myMean <- matrixMean(dat)
myVar  <- matrixVar(dat, myMean)
plot(myMean, myVar)

myT <- matrixT(dat, clas)
hist(myT)

rm(ng, ns, dat, myMean, myVar, myT)

[Package ClassComparison version 1.1 Index]