cor_permutationTest: Correlation permutation test

Description Usage Arguments Details Value

View source: R/cor_permutationTest.R

Description

For the given data matrix, the permutation test of correlation is calculated for every pair of variables.

Usage

1
2
3
4
5
6
cor_permutationTest(
  data,
  n_repetitions = 100,
  alternative = "two_sided",
  zero_precisionC = 1e-06
)

Arguments

data

Data matrix or data frame with samples in rows and variables in columns.

n_repetitions

Number of repetitions of subsampling. For large 'data' matrices, large number of repetitions can take a long time.

alternative

Alternative hypothesis for the permutation test. Takes one of the values: '"less"', '"greater"', '"two_sided"' or '"two_sided_signed"'. See details.

zero_precisionC

The zero precision passed to the C++ function. All numbers with absolute value smaller than 'zero_precisionC' will be set to zero. Defaults to 10^(-6).

Details

For every pair of variables, for 'n_repetitions' times, a permutation of the samples is randomly chosen and the correlation between the original samples for variable i and permuted samples for variable j is calculated and compared to the true correlation coefficient. The p-value is obtained as percentage of times when the "permuted" correlation was more significant that the "true" correlation. Significance is determined based on the 'alternative' parameter. If the 'alternative' is

Value

A data frame with names of variables in first two columns and p-value of correlation test between the two variables in the third column. In the rows, all pairwise correlations are listed.


ivabudimir/meNet documentation built on Dec. 20, 2021, 8:03 p.m.