Description Usage Arguments Value Examples
Computes the cosine similarity and significance using permutation test. This
function uses random numbers, to ensure reproducibility please call
set.seed()
before running the function.
1 2 3 4 5 6 7 8 | cosinePerm(
x,
y,
nperm = 1000,
alternative = c("two.sided", "less", "greater"),
include.perm = FALSE,
nthread = 1
)
|
x |
|
y |
|
nperm |
|
alternative |
|
include.perm |
|
nthread |
|
A list
estimate of the cosine similarity, p-value and
estimates after random permutations (null distribution) in include.perm is
set to 'TRUE'
1 2 3 | x <- factor(c(1,2,1,2,1))
y <- factor(c(2,2,1,1,1))
cosinePerm(x, y)
|
$estimate
[1] 0.9090909
$p.value
[1] 0.174
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.