run.permutations: Permutations for significance testing

Description Usage Arguments Value Examples

Description

Performs a permutations for significance testing. The result from this function can be used with rv.pval() to determine a p-value. By decoupling this into two functions, you don't have to redo the permutations for every p-value, hence increasing the runtime speed.

Usage

1
run.permutations(config_matrices, nperm = 1000)

Arguments

config_matrices

The result from compute.config.matrices().

nperm

The number of permutations to perform (default=1000).

Value

An n x n x nperms array of RV coefficients for the permutated data, where n is the number of datasets.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(2)
n = 100
p = 100
x1 = matrix(rnorm(n*p), n, p)
x2 = x1 + matrix(rnorm(n*p), n, p)
x3 = x2 + matrix(rnorm(n*p), n, p)
data = list(x1=x1, x2=x2, x3=x3)
config_matrices = compute.config.matrices(data)
cors = rv.cor.matrix(config_matrices)
cors_perm = run.permutations(config_matrices, nperm=1000)
rv.pval(cors, cors_perm, "x1", "x3", "x2")

iTOP documentation built on May 2, 2019, 3:44 a.m.