| gofMMDtest | R Documentation |
gofMMDtest() computes the two-sample goodness of fit test
of Schrab et al. (2024), a multiplier bootstrap based on the squared MMD.
gofMMDtest(x, y, N = 1000, bandwidth2 = 10^c(-4, -3, -2, -3/2, -5/4, -9/8))
x, y |
|
N |
number of bootstrap replications. |
bandwidth2 |
squared bandwidths of the underlying Gaussian
mixture kernel based on the average norm (norm scaled by |
The test is a multiplier bootstrap test, based on the squared MMD, where the underlying kernel is a Gaussian mixture kernel. The scaling of the norm in the kernel is done for comparison of test statistics in different dimensions.
Note that his is currently an experimental function, there are no known theoretical guarantees for applying this test to pseudo-observations, etc.
An object of class htest which is a list with
components
method |
a method string identifying the type of test. |
statistic |
the realized test statistic. |
statistics.H0 |
the bootstrapped test statistics. |
p.value |
the bootstrapped p-value. |
data.name |
a string identifying the data used. |
Marius Hofert
Schrab, A., Kim, I. Albert, M., Laurent, B., Guedj, B., Gretton, A. (2023) MMD aggregated two-sample test. Journal of Machine Learning Research 24, 1–81.
gofT2stat() for another two-sample goodness-of-fit
test statistic.
n <- 100
d <- 2
set.seed(271)
x <- matrix(runif(n * d), ncol = d)
y <- matrix(runif(n * d), ncol = d)
res <- gofMMDtest(x, y)
res$p.value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.