Matrix with all pairs of t-tests {Rfast}R Documentation

Matrix with all pairs of t-tests

Description

Matrix with all pairs of t-tests.

Usage

allttests(x, y = NULL, ina, logged = FALSE) 
ttests.pairs(x, logged = FALSE) 

Arguments

x

A numerical matrix with the data.

y

For the case of "all.tests", if you have the second group or sample provide it here, otherwise leave it NULL. For the case of "ttests.pairs" this is not required.

ina

If you have the data in one matric then provide this indicator variable separating the samples. This numerical vector must contain 1s and 2s only as values. For the case of "ttests.pairs" this is not required.

logged

Should the p-values be returned (FALSE) or their logarithm (TRUE)?

Details

The function does all the pairwise t-tests assuming unequal variances (Welch's t-test). The "all.ttests" does all the pairs formed by "cutting" the matrices x and y in two and everything between them. The "ttests.pairs" accepts a matrix x and does all the pairs of t-tests. This is similar to the correlation matrix style.

Value

A list including:

stat

A matrix with t-test statistic for each pair of variables.

pvalue

A matrix with the corresponding p-values.

dof

A matrix with the relevant degrees of freedom.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

See Also

ttests, ftests, ttest, g2Test_univariate

Examples

x <- as.matrix( iris[1:100, 1:4] )
ina <- as.numeric(iris[1:100, 5])
a <- allttests(x, ina = ina)
b <- ttests.pairs(x)  ## less tests

[Package Rfast version 2.1.0 Index]