Learn R Programming

pecora (version 0.1.2)

twoSamples: Permutatation-based two sample t-test

Description

Performs two-sample t-tests by permutations.

Usage

twoSamples(X, B = 1000, seed = 1234, 
permReturn = TRUE, label = NULL)

Value

Returns a matrix objects:

Test

Matrix with dimensions \(m x B\) of permuted two-samples t-tests. The first column is the observed one-sample t-tests.

if permReturn = TRUE otherwise returns:

Test

Vector of \(m\) observed two-samples t-tests

Arguments

X

data matrix where columns represent the m variables and rows the n observations. The columns' name defines the groups' label.

B

numeric value, number of permutations to be performed, including the identity. Default is 1000.

seed

numeric value, specify seed. Default is 1234.

permReturn

logical value, TRUE to return the t-tests and p-values permutation distribution. Default is TRUE.

label

by default label = NULL. Labels of the observations, if NULL the rows's name are considered. D

Author

Angela Andreella

Examples

Run this code
X <- matrix(rnorm(100*20), nrow=20)
rownames(X) <- c(rep(0, 10), rep(1,10))
out<- twoSamples(X = X) 

Run the code above in your browser using DataLab