Learn R Programming

USP (version 0.1.2)

KernStat: Test statistic calculated from two kernel matrices

Description

Calculate the U-statistic measure of dependence given two kernel matrices \(J\) and \(K\), as described in Section 7.1 of BKS2020USP. For the featured examples considered these matrices can be calculated using FourierKernel or InfKern. Alternatively, if a different basis is to be used, then the kernels can be entered separately.

Usage

KernStat(J, K)

Arguments

J

\(n \times n\) kernel matrix corresponding to first sample.

K

\(n \times n\) kernel matrix corresponding to second sample.

Value

Test statistic measure the strength of dependence between the two samples.

References

BKS2020USP

Examples

Run this code
# NOT RUN {
x=runif(100); y=runif(100); M=3
J=FourierKernel(x,M); K=FourierKernel(y,M)
KernStat(J,K)
# }

Run the code above in your browser using DataLab