  Kernel-based testing has revolutionized the field of non-parametric tests
through the embedding of distributions in an RKHS. This strategy has proven to
be powerful and flexible, yet its applicability has been limited to the
standard two-sample case, while practical situations often involve more complex
experimental designs. To extend kernel testing to any design, we propose a
linear model in the RKHS that allows for the decomposition of mean embeddings
into additive functional effects. We then introduce a truncated kernel
Hotelling-Lawley statistic to test the effects of the model, demonstrating that
its asymptotic distribution is chi-square, which remains valid with its Nystrom
approximation. We discuss a homoscedasticity assumption that, although absent
in the standard two-sample case, is necessary for general designs. Finally, we
illustrate our framework using a single-cell RNA sequencing dataset and provide
kernel-based generalizations of classical diagnostic and exploration tools to
broaden the scope of kernel testing in any experimental design.
