How can I change the significance level of either kruskalwallis or ranksum test?

4 visualizzazioni (ultimi 30 giorni)
Hi, this is probably an easy question for rehular matlab users but leaves me standing infront of a problem: the default significance level of kruskalwallis is 0.01 and the obe for ranksum 0.05...I would like to use the same for both and found that you can change it just not "how". Where in the code do you put the alpha value in?
I typed it in like you would for a t-test but that should change the p-value depending on your significance level i.e. if the null hypothesis gets just about accepted with 0.05 it should be rejected with 0.01. However, the p-value remains the same in both cases...
Thanks!

Risposta accettata

Star Strider
Star Strider il 2 Dic 2017
For ranksum, you have to specify it as a name-value pair as 'alpha' (link).
The kruskalwallis doesn’t have that option. However, it outputs the p-value, so you can use it to make your own decisions.
  2 Commenti
Fiona Schulz
Fiona Schulz il 2 Dic 2017
But a difference in alpha for the ranksum test should change the p-value, right?
With the default setting of 0.05, I get p=0.0614
If I change to 'alpha',0.01, I get p=0.0614
Star Strider
Star Strider il 2 Dic 2017
It will not change the p-value. It only affects the second output (in the documentation, logical value ‘h’), that is the ‘test decision flag’.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by