jaccardInd: Jaccard Index for Multiple Contigency Tables

Description Usage Arguments Value Examples

View source: R/enrichment.R

Description

Computes a vector jaccard indices for n 2x2 contingency tables T = {t_1,t_2,...,t_n-1,t_n}

Usage

1
jaccardInd(a, b, c, d)

Arguments

a

A vector of values where a_i corresponds to t_i

b

A vector of values where b_i corresponds to t_i

c

A vector of values where c_i corresponds to t_i

d

A vector of values where d_i corresponds to t_i

Value

A vector of Jaccard indices j=j_1, j_2,...,j_n-1,j_n where j_i corresponds to the jaccard index of t_i.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
T = \{t_{1},t_{2},...,t_{n-1},t_{n}\}, with each t_i of the form:
           setAn ¬setA
       setB  a     b | a+b
      ¬setB  c     d | c+d
         ------------|-----
            a+c   b+d| a+b+c+d

Given three contingency tables:
     setA  ¬setA          setA  ¬setA         setB  ¬setB
setB  3     100        setC  5     6        setD  20     45
¬setB  123   500       ¬setC  10    100     ¬setD  60     1000



a=c(3, 5, 20)
b=c(100, 6, 45)
c=c(123, 10, 60)
d=c(500, 100, 1000)
ji = jaccardInd(a,b,c,d)

MaayanLab/genesetr documentation built on Aug. 14, 2019, 12:20 p.m.