Why I am getting Same p-value, h and stats while using Wilcoxon Rank test for 7 different data set?
Show older comments
I am trying to find the significant realtion between the az_solar and Mean_Surface_REF of seven different bands using Wilcoxon rank test. But I am geeting same p-value and statistics for every bands. However, each band contains different value.
Would some one please help me regrading these issue?
%% This is the code i am using
[p1,h1,stats1] = ranksum(az_solar,Mean_Surface_REF(:,1));
[p2,h2,stats2] = ranksum(az_solar,Mean_Surface_REF(:,2));
[p3,h3,stats3] = ranksum(az_solar,Mean_Surface_REF(:,3));
[p4,h4,stats4] = ranksum(az_solar,Mean_Surface_REF(:,4));
[p5,h5,stats5] = ranksum(az_solar,Mean_Surface_REF(:,5));
[p6,h6,stats6] = ranksum(az_solar,Mean_Surface_REF(:,5));
[p7,h7,stats7] = ranksum(az_solar,Mean_Surface_REF(:,7));
Results:
8.1275311e-44
8.1275311e-44
8.1275311e-44
8.1275311e-44
8.1275311e-44
8.1275311e-44
8.1275311e-44
Also, I have attached my dataset.
Accepted Answer
More Answers (1)
the cyclist
on 13 Jun 2022
Edited: the cyclist
on 13 Jun 2022
That test statistic only depends on the count and relative ordering of the respective set elements. In your case, it looks like the counts are always the same, and (as @dpb points out), your 7 cases are always completely offset from the comparator set.
Here is a small example showing the same thing:
x = 1:5;
y1 = 101:105; % 5 elements, fully offset from x
y2 = 1001:1005; % Also 5 elements, fully offset from x [same result]
y3 = 101:103; % 3 elements, still fully offset [different result due to different count]
ranksum(x,y1)
ranksum(x,y2)
ranksum(x,y3)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!