permTest: Permutation test for the Interaction Information.

Description Usage Arguments Details Value Author(s) References Examples

Description

The function performs permutation test for the positiveness of Interaction Information I(y1,y2;x1)=MI(y1,y2|x1)-MI(y1,y2), where MI(y1,y2|x1) is conditional mutual information between y1 and y2, given x1 and MI(y1,y2) is mutual information between y1 and y2. The null hypothesis is

H0: x1 is indpependent from (y1,y2).

The alternative hypothesis is

H1: I(y1,y2;x1)>0.

Usage

1
permTest(y1,y2,x1,nbins=NULL,alpha=0.05,B=1000,method="emp")

Arguments

y1

First variable.

y2

Second variable.

x1

The additional coviariate.

nbins

Number of bins to be used for the discretization. By default the number of bins is set to (N)^(1/3) where N is the number of samples.

alpha

Significance level, the default value is 0.05.

B

Number of permutations, the default value is 1000.

method

The method used to estimate entropy. See function interinformation in R package infotheo for details.

Details

If the variables y1, y2, x1 are not factors, they are discretized using 'discretize' function from R package 'infotheo'. Discretization is needed to calculate Interaction Information. The Interaction Information is computed using function interinformation from R package infotheo.

Value

A list with class "permTest" containing the following components:

pv

P-value of permutation test.

intInfo0

Interaction Information computed on original data.

intInfo

Vector of length B, containing values of Interaction Information corresponding to B permuted samples.

alpha

Significance level.

dec

Logical value. TRUE denotes significantly positive Interaction Information.

B

Number of permutations.

Author(s)

Pawel Teisseyre

References

Pawel Teisseyre, Jan Mielniczuk, Michal J. Dabrowski, Detection of hidden associations and interactions in biomedical data using Interaction Information, manuscript, 2017.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#Example (XOR problem):
y1=c(rep(0,25),rep(1,25),rep(1,25),rep(0,25))
y2=c(rep(0,25),rep(1,25),rep(0,25),rep(1,25))
x1=c(rep(1,50),rep(0,50))

permTest1=permTest(y1,y2,x1)
# Make histogram for Interaction Information, based on permutation samples.
hist(permTest1$intInfo)

#Example (XOR problem- x1 continuous):
y1=c(rep(0,25),rep(1,25),rep(1,25),rep(0,25))
y2=c(rep(0,25),rep(1,25),rep(0,25),rep(1,25))
x1=c(rnorm(50,1,0.5),rnorm(50,0,0.5))

permTest1=permTest(y1,y2,x1)
# Make histogram for Interaction Information, based on permutation samples.
hist(permTest1$intInfo)

teisseyrep/interactionInfo documentation built on May 31, 2019, 8:32 a.m.