Title: | Jackknife Mutual Information |
---|---|
Description: | Computes the Jackknife Mutual Information (JMI) between two random vectors and provides the p-value for dependence tests. See Zeng, X., Xia, Y. and Tong, H. (2018) <doi:10.1073/pnas.1715593115>. |
Authors: | Zeng Xianli <[email protected]>, Hang Weiqiang <[email protected]> |
Maintainer: | Zeng Xianli <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.0 |
Built: | 2025-02-04 03:38:25 UTC |
Source: | https://github.com/cran/JMI |
This function provides method for dependence test. It uses permutation test to determine the rejection region.
JMI(x, y, BN = 1000)
JMI(x, y, BN = 1000)
x |
n by p sample matrix. |
y |
n by q sample matrix. |
BN |
Number of permutations, the default value is 1000. |
the output is a list which contains:
mi: the value of Jackknife Mutual information
pvalue: the p-value of independence test that based on the permutation of JMI, the value is not provided if BN=0.
Zeng, X., Xia, Y., & Tong, H. (2018). Jackknife approach to the estimation of mutual information[J]. Proceedings of the National Academy of Sciences, 201715593.
x <- matrix(rnorm(50*3),50,3) y <- matrix(rnorm(50*2),50,2) #calculate the Jackknife Mutual information between x and y. JMI(x,y,0)$mi #calculate the p-value of independent test between x and y that based on 500 permutations. JMI(x,y,500)$pvalue
x <- matrix(rnorm(50*3),50,3) y <- matrix(rnorm(50*2),50,2) #calculate the Jackknife Mutual information between x and y. JMI(x,y,0)$mi #calculate the p-value of independent test between x and y that based on 500 permutations. JMI(x,y,500)$pvalue