statT: t-test

View source: R/statT.R

statTR Documentation

t-test

Description

Apply one-sample t-test separately to each plate

Usage

statT(normMatrix, repIndex, normRows = NULL, normCols = NULL,
  testSide = "two.sided", trueMean = 0)

Arguments

normMatrix

Data frame or numeric matrix of normalized data. Columns are plates, and rows are plate wells.

repIndex

Integer vector indicating replicates in normMatrix. Which plates are replicates of each other? Provide the same number for plates belonging to a replicate group. Each index in the vector matches the corresponding column of normMatrix.

normRows, normCols

Optional integer vector. Indicate which row/column numbers from the normMatrix should be tested. If NULL then all rows/columns from the normMatrix are used.

testSide

Optional. Type of t-test: 'two.sided', 'less', or 'greater'. Default is 'two.sided'.

trueMean

Optional. Number indicating true value of mean. Default is 0.

Details

Standard one-sample t-test is applied to the normalized data.

Value

A matrix of parameters for each replicate group is returned:

T-statistic

Value of the t-statistic.

Mean_Difference

Difference between the calculated and the true mean.

Standard_Error

Standard error of the difference between means.

Degrees_Of_Freedom

Degrees of freedom for the t-statistic.

P-value

P-value for the t-test.

See Also

Other statistical methods: statFDR, statRVM

Examples

## load dataset
data(ex_dataMatrix)

## normalize data matrix using any method and store in new variable
ex_normMatrix <- normSights(dataMatrix = ex_dataMatrix, dataCols = 5:10,
normMethod = 'normZ')
## apply T test to normalized data matrix and get the p-values
ex_testMatrix <- statT(normMatrix = ex_normMatrix, trueMean = 0,
repIndex = c(1,1,1,2,2,2))


eg-r/sights documentation built on Jan. 28, 2023, 12:17 a.m.