calculate a P value using a permutation test

56 ビュー (過去 30 日間)
noa goldman
noa goldman 2020 年 1 月 11 日
コメント済み: Shuting Li 2021 年 2 月 1 日
How can I calculate a P value using a permutation test for these 2 groups?
controlA=[0.22, -0.87, -2.39, -1.79, 0.37, -1.54, 1.28, -0.31, -0.74, 1.72, 0.38, -0.17, -0.62, -1.10, 0.30, 0.15, 2.30, 0.19, -0.50, -0.09];
treatmentA=[-5.13, -2.19, -2.43, -3.83, 0.50, -3.25, 4.32, 1.63, 5.18, -0.43, 7.11, 4.87, -3.10, -5.81, 3.76, 6.31, 2.58, 0.07, 5.76, 3.50];
I know that both samples come from the same distribution.
thanks
  1 件のコメント
Shuting Li
Shuting Li 2021 年 2 月 1 日
permutationTest(controlA, treatmentA, 10000, 'plotresult', 1);
and the permutation code is in https://github.com/lrkrol/permutationTest.git

サインインしてコメントする。

回答 (2 件)

Star Strider
Star Strider 2020 年 1 月 11 日
In MATLAB, use the ranksum function.
For your data:
p =
0.350702223666955
h =
0
stats =
zval: -0.933228071880792
ranksum: 375
So the ‘p’ value indicates that they are not significantly different, and ‘h’ indicates that the null hypothesis is not rejected.
  3 件のコメント
Star Strider
Star Strider 2020 年 1 月 11 日
I have never heard of the ’permutation test’. When I did an Interweb search on it, the Wilcoxon rank-sum test came up in several examples. That is the reason I use it here.
BINNAN YU
BINNAN YU 2020 年 5 月 7 日
permutation test is equivalent to wilcoxon rank-sum test, but two are different test

サインインしてコメントする。


Jeff Miller
Jeff Miller 2020 年 1 月 12 日
This contribution on file exchange looks like it will do what you want.

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by