Hi Xia Keshan, Yes, in the current example it is only two, but this was just for simplification. In my current data the number of groups and repetitions (k) vary but I was able to extend the code of RW9 (by including additional do loops) to accommodate my settings. I believe the same can be done with your code. Thanks to the both of you (Keshan and RW9), you've been very helpful!
... View more