Reputation: 21
I am performing a Kruskal-Wallis test on my dataset and I am trying to adjust the p-value but it does not seem to work, here is my code:
> kruskal.test(df$Folate_biosynthesis, df$Group, p.adj="holm")
Kruskal-Wallis rank sum test
data: df$Folate_biosynthesis and df$Group Kruskal-Wallis chi-squared
= 8.5144, df = 5, p-value = 0.1301
> kruskal.test(df$Folate_biosynthesis, df$Group, p.adj="none")
Kruskal-Wallis rank sum test
data: df$Folate_biosynthesis and df$Group Kruskal-Wallis chi-squared
= 8.5144, df = 5, p-value = 0.1301
As you can see if I put p.adjust = "none"
I obtained exactly the same result. How is it possible?
Thanks in advance to everyone willing to help.
Andrea
Upvotes: 0
Views: 1547
Reputation: 61903
P-value adjustments usually are done when you have multiple p-values. You only have a single p-value so I'm wondering what you expect the adjustment to do here.
With that said it also doesn't appear there is a p.adj
parameter for kruskal.test
. The function has a dots parameter but as far as I can tell it doesn't use or pass those along to any further functions so any input that isn't a named parameter will essentially be ignored.
If you wanted to adjust the p-values from multiple outputs from kruskal.test
you could collect the p-values in a vector and pass them directly to p.adjust
with the appropriate method.
But with all that said it's not clear what you're hoping to achieve - but it is clear that trying to use a p.adj
parameter in kruskal.test
is not the way to achieve your goal.
Upvotes: 2