R/utils.R
permutation_test.Rd
Computes the significance of (partial) correlation based on permutations of the observations
permutation_test(x, y, iter = 1000, fun = pcor, mode = 1, ...)
wild type data set
mutant data set
number of iterations (permutations)
function to compute the statistic, e.g., cor or pcor
either 1 for a function that takes a single data set and produces an output of class matrix, and 2, if the function takes two data sets
additional arguments for function 'fun'
matrix of p-values
x <- matrix(rnorm(100),10,10)
y <- matrix(rnorm(100),10,10)
permutation_test(x,y,iter=10)
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> Warning: The inverse of variance-covariance matrix is calculated using Moore-Penrose generalized matrix invers due to its determinant of zero.
#> Warning: NaNs produced
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> [1,] 1.0 0.5 0.1 0.0 0.6 0.4 0.2 0.6 0.6 0.4
#> [2,] 0.5 1.0 0.0 0.1 0.8 0.8 0.8 0.2 0.9 0.7
#> [3,] 0.1 0.0 1.0 0.5 0.6 0.0 0.1 0.6 0.1 0.0
#> [4,] 0.0 0.1 0.5 1.0 1.0 0.1 0.3 0.9 0.6 0.1
#> [5,] 0.6 0.8 0.6 1.0 1.0 0.3 0.5 0.7 0.9 0.1
#> [6,] 0.4 0.8 0.0 0.1 0.3 1.0 0.3 0.2 0.8 0.2
#> [7,] 0.2 0.8 0.1 0.3 0.5 0.3 1.0 0.4 1.0 0.9
#> [8,] 0.6 0.2 0.6 0.9 0.7 0.2 0.4 1.0 0.5 0.3
#> [9,] 0.6 0.9 0.1 0.6 0.9 0.8 1.0 0.5 1.0 1.0
#> [10,] 0.4 0.7 0.0 0.1 0.1 0.2 0.9 0.3 1.0 1.0