  We propose a kernel-based partial permutation test for checking the equality
of functional relationship between response and covariates among different
groups. The main idea, which is intuitive and easy to implement, is to keep the
projections of the response vector $\boldsymbol{Y}$ on leading principle
components of a kernel matrix fixed and permute $\boldsymbol{Y}$'s projections
on the remaining principle components. The proposed test allows for different
choices of kernels, corresponding to different classes of functions under the
null hypothesis. First, using linear or polynomial kernels, our partial
permutation tests are exactly valid in finite samples for linear or polynomial
regression models with Gaussian noise; similar results straightforwardly extend
to kernels with finite feature spaces. Second, by allowing the kernel feature
space to diverge with the sample size, the test can be large-sample valid for a
wider class of functions. Third, for general kernels with possibly
infinite-dimensional feature space, the partial permutation test is exactly
valid when the covariates are exactly balanced across all groups, or
asymptotically valid when the underlying function follows certain regularized
Gaussian processes. We further suggest test statistics using likelihood ratio
between two (nested) GPR models, and propose computationally efficient
algorithms utilizing the EM algorithm and Newton's method, where the latter
also involves Fisher scoring and quadratic programming and is particularly
useful when EM suffers from slow convergence. Extensions to correlated and
non-Gaussian noises have also been investigated theoretically or numerically.
Furthermore, the test can be extended to use multiple kernels together and can
thus enjoy properties from each kernel. Both simulation study and application
illustrate the properties of the proposed test.
