Description Usage Arguments Details Value Author(s) References See Also Examples
The function performs a hybrid 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.
The hybrid test combines a permutation test (see function permTest
) and chi squared test (see function chisqTest
). If the dependence between y1 and y2 is weak then the chi squared test is used. Otherwise, the permutation test is used.
1 | hybridTest(y1,y2,x1,nbins=NULL,alpha=0.05,alpha0=0.05,B=1000,method="emp")
|
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. |
alpha0 |
Significance level of the initial test for dependence between y1 and y2, the default value is 0.05. |
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. |
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 "hybridTest" 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. The value is returned only if the permutation test was used. Otherwise it is NULL. |
alpha |
Significance level. |
alpha0 |
Significance levelof the initial test. |
dec |
Logical value. TRUE denotes significantly positive Interaction Information. |
B |
Number of permutations. The value is returned only if the permutation test was used. Otherwise it is NULL. |
df |
Degrees of freedom. The value is returned only if the chi squared test was used. Otherwise it is NULL. |
type |
Type of the test used in the hybrid procedure. The possible values are: "permTest" if the permutation test was used and "chisqTest" if the chi sqaured test was used. |
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 16 17 18 | #Example (Positive Interaction Information, no dependence between y1 and y2):
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))
hybridTest1=hybridTest(y1,y2,x1)
#In this case, chisqTest was used in hybridTest:
print(hybridTest1)
#Example (Positive Interaction Information, dependence between y1 and y2):
y1=c(rep(0,40),rep(1,40),rep(1,10),rep(0,10))
y2=c(rep(0,40),rep(1,40),rep(0,10),rep(1,10))
x1=c(rep(1,80),rep(0,20))
hybridTest1=hybridTest(y1,y2,x1)
#In this case, permTest was used in hybridTest:
print(hybridTest1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.