The null hypothesis is \(H_0: f_1 \equiv f_2\) where \(f_1, f_2\)
are the respective density functions. The measure of discrepancy is
the integrated squared error (ISE)
\(T = \int [f_1(\bold{x}) - f_2(\bold{x})]^2 \, d \bold{x}\). If
we rewrite this as \(T = \psi_{0,1} - \psi_{0,12} - \psi_{0,21} + \psi_{0,2}\)
where \(\psi_{0,uv} = \int f_u (\bold{x}) f_v (\bold{x}) \, d \bold{x}\),
then we can use kernel functional estimators. This test statistic has a null
distribution which is asymptotically normal, so no bootstrap
resampling is required to compute an approximate p-value.
If H1,H2
are missing then the plug-in selector Hpi.kfe
is automatically called by kde.test
to estimate the
functionals with kfe(, deriv.order=0)
. Likewise for missing
h1,h2
.
As of ks 1.8.8, kde.test(,binned=TRUE)
invokes binned
estimation for the computation of the bandwidth selectors, and not the
test statistic and p-value.