# Implementing permutation tests in randomized controlled trials with repeated measures

I am trying to implement a permutation test to use for testing treatment effects in a repeated measures RCT-design. Unfortunately I am having some trouble understanding how to design a correct permutation procedure to do this.

Suppose I have a randomized controlled trial with $$k$$ repeated measurements, one of them being taken pre-randomization. There are $$h$$ different treatment groups, and the outcome variable $$y$$ is continuous. The measurement for the $$i$$-th subject taken at the $$k$$-th timepoint is modeled using a repeated measures linear mixed model as:

$$y_{ihk}=(\beta_0+\gamma_{0i})+\beta_{1k}T_{ik}+\beta_{2hk}T_{ik}G_{ih}+\varepsilon_{ihk}$$

where $$T_{ik}$$ is a dummy variable for the $$k$$-th timepoint, which is equal to 0 for $$k = 1$$ (the baseline measurement), and equal to 1 otherwise, and $$G_{ih}$$ is a dummy variable for treatment group, which is equal to 0 for $$h=1$$ (the control group), and equal to 1 otherwise. The subject-specific random intercept is given by $$\gamma_{0i}$$.

Following the method described here, only the main effect for time and the time*group interaction are included in the model, so that the groups are constrained to be the same at baseline (justified by the randomization).

I am trying to use a permutation test to test the null hypothesis that there is no treatment effect, or equivalently, the hypothesis that $$\beta_{2hk}=0$$. However, I have read that it is not straightforward to test interaction effects using permutation tests. For example, as noted in this paper (1):

In situations where the strategy required for an exact test is not possible (i.e., where the restrictions required leave no possible permutations), then no exact test exists, but an approximate permutation test may be used. This occurs, for example, in the case of interaction terms.

Unfortunately, I don't quite understand exactly why this is problematic. My initial, naïve idea was simply to permute the treatment group memberships of the subjects. Would this be a viable strategy?

(1) Marti Anderson & Cajo Ter Braak (2003) Permutation tests for multi-factorial analysis of variance, Journal of Statistical Computation and Simulation, 73:2, 85-113, DOI: 10.1080/00949650215733