MINTauto {IndepTest}R Documentation

MINTauto

Description

Performs an independence test without knowledge of either marginal distribution using permutations and using a data-driven choice of kk.

Usage

MINTauto(x, y, kmax, B1 = 1000, B2 = 1000)

Arguments

x

The n×dXn \times d_{X} data matrix of the XX values.

y

The response vector of length n×dYn \times d_{Y} data matrix of the YY values.

kmax

The maximum value of kk to be considered for estimation of the joint entropy H(X,Y)H(X,Y).

B1

The number of repetitions used when choosing kk, set to 1000 by default.

B2

The number of permutations to use for the final test, set at 1000 by default.

Value

The pp-value corresponding the independence test carried out and the value of kk used.

References

Berrett, T. B. and Samworth R. J. (2017). “Nonparametric independence testing via mutual information.” ArXiv e-prints. 1711.06642.

Examples


# Independent univariate normal data
x=rnorm(1000); y=rnorm(1000);
MINTauto(x,y,kmax=200,B1=100,B2=100)
# Dependent univariate normal data
library(mvtnorm)
data=rmvnorm(1000,sigma=matrix(c(1,0.5,0.5,1),ncol=2))  
MINTauto(data[,1],data[,2],kmax=200,B1=100,B2=100)
# Dependent multivariate normal data
Sigma=matrix(c(1,0,0,0,0,1,0,0,0,0,1,0.5,0,0,0.5,1),ncol=4)
data=rmvnorm(1000,sigma=Sigma)
MINTauto(data[,1:3],data[,4],kmax=50,B1=100,B2=100)



[Package IndepTest version 0.2.0 Index]