cosinePerm: Computes the cosine similarity and significance using permutation test
Description
Computes the cosine similarity and significance using permutation test
Usage
cosinePerm(x, y, nperm = 1000, alternative = c("two.sided", "less",
"greater"), include.perm = FALSE, setseed = 12345, nthread = 1)
Arguments
x
[factor] is the factors for the first variable
y
[factor] is the factors for the second variable
nperm
[integer] is the number of permutations to comput ethe null distribution of MCC estimates
alternative
[string] indicates the alternative hypothesis and must be one of
<U+2018>"two.sided"<U+2019>, <U+2018>"greater"<U+2019> or <U+2018>"less"<U+2019>. You can specify just
the initial letter. <U+2018>"greater"<U+2019> corresponds to positive
association, <U+2018>"less"<U+2019> to negative association.
Options are "two.sided", "less", or "greater"
include.perm
[boolean] indicates whether the estimates for the null distribution should be returned.
Default set to 'FALSE'
setseed
[integer] is the seed specified by the user. Defaults is '12345'
nthread
[integer] is the number of threads to be used to perform the permutations in parallel
Value
[list] estimate of the cosine similarity, p-value and estimates after random permutations (null distribution) in include.perm is set to 'TRUE'