Learn R Programming

pecora (version 0.1.2)

oneSample: Permutatation-based one sample t-test

Description

Performs sign-flipped one-sample t-tests.

Usage

oneSample(X, B = 1000, seed = 1234, permReturn = TRUE)

Value

Returns an object matrix:

tv

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

if permReturn = TRUE otherwise returns:

tv

Vector of \(m\) observed one-sample t-tests

Arguments

X

data matrix where columns represent the m variables and rows the n observations.

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 permutation distribution. Default is TRUE.

Author

Angela Andreella

Examples

Run this code
X <- matrix(rnorm(100*20), nrow=20)
out <- oneSample(X = X)

Run the code above in your browser using DataLab