MINTknown {IndepTest}R Documentation

MINTknown

Description

Performs an independence test when it is assumed that the marginal distribution of YY is known and can be simulated from.

Usage

MINTknown(x, y, k, ky, w = FALSE, wy = FALSE, y0)

Arguments

x

The n×dXn \times d_X data matrix of XX values.

y

The n×dYn \times d_Y data matrix of YY values.

k

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

ky

The value of kk to be used for estimation of the marginal entropy H(Y)H(Y).

w

The weight vector to used for estimation of the joint entropy H(X,Y)H(X,Y), with the same options as for the KLentropy function.

wy

The weight vector to used for estimation of the marginal entropy H(Y)H(Y), with the same options as for the KLentropy function.

y0

The data matrix of simulated YY values.

Value

The pp-value corresponding the independence test carried out.

References

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

Examples

library(mvtnorm)
x=rnorm(1000); y=rnorm(1000);
# Independent univariate normal data
MINTknown(x,y,k=20,ky=30,y0=rnorm(100000))  
library(mvtnorm)
# Dependent univariate normal data
data=rmvnorm(1000,sigma=matrix(c(1,0.5,0.5,1),ncol=2))
# Dependent multivariate normal data
MINTknown(data[,1],data[,2],k=20,ky=30,y0=rnorm(100000))   
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)
MINTknown(data[,1:3],data[,4],k=20,ky=30,w=TRUE,wy=FALSE,y0=rnorm(100000))


[Package IndepTest version 0.2.0 Index]