Cosine Permutations
cosinePerm.RdComputes the cosine similarity and significance using permutation test. This
function uses random numbers, to ensure reproducibility please call
set.seed() before running the function.
Usage
cosinePerm(
x,
y,
nperm = 1000,
alternative = c("two.sided", "less", "greater"),
include.perm = FALSE,
nthread = 1,
...
)Arguments
- x
factoris the factors for the first variable- y
factoris the factors for the second variable- nperm
integeris the number of permutations to compute the null distribution of MCC estimates- alternative
stringindicates the alternative hypothesis and must be one of ‘'two.sided'’, ‘'greater'’ or ‘'less'’. You can specify just the initial letter. ‘'greater'’ corresponds to positive association, ‘'less'’ to negative association. Options are 'two.sided', 'less', or 'greater'- include.perm
booleanindicates whether the estimates for the null distribution should be returned. Default set to 'FALSE'- nthread
integeris the number of threads to be used to perform the permutations in parallel- ...
A
listof fallthrough parameters