Box plots for Kruskal-Wallis

15 views (last 30 days)
Hello,
I'm plotting Kruskal-Wallis results for my paper. I'm not sure how to interpret folded edges on the plot (shown with an arrow on the picture) and how to add mean lines to the plots. Thanks for help
kruskal wallis.PNG

Accepted Answer

fred  ssemwogerere
fred ssemwogerere on 9 Feb 2020
Hello, when the end point of a notch is lower than the 25th quartile of your data, that folding effect will occur. This effect is common to small datasets or small group size (when between groups of data).
% To calculate the end points of the lower and upper notch
lowerNotch=median(data)-1.57*iqr(data)/sqrt(numel(data)); % iqr is interquartile range
upperNotch=median(data)+1.57*iqr(data)/sqrt(numel(data));
% For a small value of "n" the notch will tend to extend beyond either the 75th percentile or 25th percentile (the upper and lower ends of the box respectively.
% If you compute the 25th percentile of your data and compare it to the end point of the lower notch, you will
% find this to be true. However, that won't be the case with the upper notch based on your plot.
  4 Comments
Sylwia Kaduk
Sylwia Kaduk on 10 Feb 2020
Wow, it worked. Thanks a lot, it's a big help

Sign in to comment.

More Answers (0)

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!