The current permutation test for p-values using ITS estimates the null distribution by using alternative cutoff points for pre and post-intervention periods. Instead, we should permute the order of the post-treatment observations to estimate null effects and use those estimated effects under permuted post-treatment observations to estimate the null distribution.
As a reminder, we can easily create permutations using a[shuffle(1:end), :].
This is not quite correct. A better way is to repeatedly randomly assign observations to the pre or post-intervention period and estimate the causal effect to generate a null distribution.
The current permutation test for p-values using ITS estimates the null distribution by using alternative cutoff points for pre and post-intervention periods. Instead, we should permute the order of the post-treatment observations to estimate null effects and use those estimated effects under permuted post-treatment observations to estimate the null distribution.
As a reminder, we can easily create permutations using a[shuffle(1:end), :].