MENU

Fun & Interesting

Permutation Test for Paired Data in R

Video Not Working? Fix It Now

You should not treat paired data as two separate groups because you lose information. You should instead analyze the differences (eg left - right, before - after). This demonstrates a permutation test in R for paired data. In particular, this tests whether the two shoulders are equally flexible on swimmers. The basic idea is to randomly swap measurements for each observation (eg swap the left and right shoulder measurement), calculate the differences, and find the new average of the differences. We can actually shorten these 3 steps into 2 by just randomly multiplying some of the swimmers' differences by -1.

Comment