I'm using PermutationTest2 to compare two samples. My data is
paired, so I am using the "paired=T" option. I wasn't convinced this
algorithm was working the way I thought, so I did a simple test:
a<-c(1,1,1)
b<-c(10,10,10)
c<-permutationTest2(a,data2=b,statistic=mean,paired=T)
When I view c$replicates, I see lots of 0s, 9s and -9s. How can it
calculate 0 for one of the replicates if it is keeping the pairs
together? I would think the only permutations would be:
1-10 and 10-1 (or -9 and 9). Obviously, it's also using 10-10 and
1-1 to get the "0" replicates.
When I use paired=F, I also get replicates that include 0, 9 and -9.
I understand that.
Does anyone understand how the paired=T option works?
|