# z01-matrixT: Multiple T Tests by Matrix Multiplication In oompaBase: Class Unions, Matrix Operations, and Color Schemes for OOMPA

## Description

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

## Usage

 ```1 2 3 4 5``` ```matrixMean(x,na.rm=FALSE) matrixVar(x, xmean, na.rm=FALSE) matrixT(m, v, na.rm=FALSE) matrixUnequalT(m, v) matrixPairedT(m, v, pf) ```

## Arguments

 `x` a matrix `xmean` a numeric vector or single-column matrix `m` a matrix `na.rm` a logical value indicating whether means, variances, and t-statistics should be computed after omitting NA values from individual rows of the data matrix. `v` a logical vector of length equal to the number of columns of `m` `pf` a numerical vector of length equal to the number of columns of `m`, indicating which samples should be paired

## Value

`matrixMean` returns a single-column matrix containing the row-by-row means of `x`.

`matrixVar` returns a single-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.

`matrixPairedT` returns a single-column matrix of t-statistics from a paired t-test.

`matrixUnequalT` returns a list with two components: `tt` is a single-column matrix of t-statistics from a two-sample unequal variance t-test comparing the columns for which `v` is true to those for which `v` is false, and `df` is a single-column matrix of the degrees of freedom associated with each row..

## Author(s)

Kevin R. Coombes <krc@silicovore.com>

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```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) ```

oompaBase documentation built on Aug. 24, 2019, 5:02 p.m.