kassambara / rstatix

Pipe-friendly Framework for Basic Statistical Tests in R
https://rpkgs.datanovia.com/rstatix/
440 stars 50 forks source link

Benjamini-Hochberg #205

Open J-Ferris opened 6 months ago

J-Ferris commented 6 months ago

I am trying to interpret the results of a Dunn's test with a BH correction but I'm confused with how the dunn_test() function applies the correction and determines significance. I have 4 groups of shark species, so 6 pairwise comparisons and the resulting table tells me that 5 of my groupings are significantly different (adj.p<0.05).

However, when I perform the step-up procedure myself, I only get 4 significant results. I am ranking the adj.p.values smallest to largest, and comparing them to (i/m)*Q, where i=ranking, m=total number of comparisons, and Q=0.05. Can someone explain the discrepancy here? My two theories are: I have to do the step up procedure myself and use those results, OR, the bh applied in the package is using a different formula to determine significance and I should follow this formula instead.

For reference, I am comparing the median depths and temperatures of 4 shark species in the Atlantic ocean, with species sample sizes ranging between 14 and 32.

image image