Get permuation-based p-value for association between two vectors.
getPval(matrix, x.index, y.index, N.rand = 1000, method = "spearman", renorm = F, permutandboot = F, plot = F, verbose = F)
matrix | input matrix |
---|---|
x.index | index of first vector in the input matrix |
y.index | index of second vector in the input matrix |
N.rand | number of iterations used for the permutation test |
method | similarity measure (supported measures are: "pearson", "spearman", "bray" and "kld") |
renorm | renormalize after permutation |
permutandboot | compute a bootstrap distribution in addition to the permutation distribution and |
plot | plot the histogram of the permutation and, if permutandboot is true, of the bootstrap distribution |
verbose | print distribution properties and p-value |
p-value of the association
# Compute the association between two vectors using the given method and compute its p-value using a permutation test. This method was adapted from R code by Fah Sahtirapongsasuti. This method was adapted from CCREPE: http://huttenhower.sph.harvard.edu/ccrepe. Emma Schwager et al Detecting statistically significant associtations between sparse and high dimensional compositional data. (In progress).