![]() At last, I random sample 20 points from a uniform distribution. The result of permutation test is shown in the following figure. Second, I random sample 20 points from standard normal distribution. It is also important to note that there is no zero in median difference and the smallest value is 1. Then we can see that distribution with the median difference is definitely not a normal distribution. ![]() The result is shown in the following figure. Then using permutation test with the median difference and the mean difference between two separate groups, each of which has 10 points. Here I give some counterexamples.įirst, choosing $1,\cdots, 20$ as the group data points of 20. I think the distribution of the median difference in permutation test does not follow a normal distribution. I want to know how to explain the difference between method1 and method2.įor method2, We are not comparing the absolute values of our simulated values to the actual difference of medians, please don not stop think the question when you see the comments below our post. which method is the correct way to compute p-value of permutation test? When could I use the method2? In my opinion, I think only method1 is correctly, but some one tell me method2 is right.I find a post of sample medians distribution: Central limit theorem for sample medians, does anybody can help me to understand the medians difference distribution base on it? If the difference in variance of the two sample groups remain even, could distribution of median difference be normal distribution? In my example, distribution of median difference is not normal distribution, am I right? The distribution of median difference (variable reps in the script) seem not to fit a normal distribution.Ī problem with doing a permutation test of equality of means occurs if you think that the possible difference in variance of the two groups will remain even if the null of equal means is true. ![]() The distribution of p-value between method1 and method2 has dramatically difference. Pnorm.permutation=2*pnorm(-abs((ts-mean(c(reps,ts)))/sd(c(reps,ts))))īut I find after 9999 iterations. In my R script (shown below), there are two ways to compute the two tailed test p-value, one is sum(abs(c(ts, reps)) >= ts)/10000 (method1: p.permutation), the other is 2*pnorm(-abs((ts-mean(c(reps,ts)))/sd(c(reps,ts)))) (method2: pnorm.permutation). Recently, I want to apply the permutation test to find out if the difference of median for sample1 and sample2 has difference. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |