ioa | R Documentation |
This is a very basic index of association (IOA). It simply counts how often two vectors increase or decrease in parallel.
ioa(x, y)
x |
a numeric vector |
y |
a numeric vector |
numeric between 0 and 1. 0 means the two vectors are always changing in opposite directions, 1 means they are always changing in identical directions
Norman Matloff
Matloff N. (2011), The Art of R Programming (and page 49 therein).
a <- 1:10
b <- 11:20
c <- 110:101
set.seed(123)
d <- rnorm(100, 7, 1)
set.seed(234)
e <- rnorm(100, 200, 10)
ioa(a, b)
ioa(a, c)
ioa(d, e)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.