ioa: Index of Association

View source: R/ioa.R

ioaR Documentation

Index of Association

Description

This is a very basic index of association (IOA). It simply counts how often two vectors increase or decrease in parallel.

Usage

ioa(x, y)

Arguments

x

a numeric vector

y

a numeric vector

Value

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

Author(s)

Norman Matloff

References

Matloff N. (2011), The Art of R Programming (and page 49 therein).

Examples

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)


environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.