Description Usage Arguments Details Value Author(s) References Examples
The function performs chi-squared 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.
| 1 | 
| 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. | 
| method | The method used to estimate entropy. See function interinformation in R package infotheo for 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.
A list with class "chisqTest" containing the following components:
| pv | P-value of chi squared test. | 
| intInfo0 | Interaction Information. | 
| alpha | Significance level. | 
| dec | Logical value. TRUE denotes significantly positive Interaction Information. | 
| df | Degrees of freedom. | 
Pawel Teisseyre
Pawel Teisseyre, Jan Mielniczuk, Michal J. Dabrowski, Detection of hidden associations and interactions in biomedical data using Interaction Information, manuscript, 2017.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #Example (XOR problem- all variables discrete):
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))
chisqTest1=chisqTest(y1,y2,x1,nbins=NULL,alpha=0.05)
print(chisqTest1)
#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))
chisqTest2=chisqTest(y1,y2,x1,nbins=NULL,alpha=0.05)
print(chisqTest2)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.