ranksum function - syntax, Statistics and Machine Learning toolbox

In one of the Matlab examples for the ranksum function it mentions that: “The weather data shows the daily high temperatures taken in the same month in two consecutive years. Perform a left-sided test to assess the increase in the median at the 1% significance level.” [p,h,stats] = ranksum(year1,year2,'alpha',0.01,'tail','left')”
I have tested and found that (as expected) the same result as before would be obtained as follows: [p,h,stats] = ranksum(year2,year1,'alpha',0.01,'tail','right')
Thus, is it correct that the syntax of the ranksum function is as follows: In the case where we perform a right tail test in order to test whether the population median of Year 2 is higher compared to Year 1 (with a selected significance level) do we put ‘year 2’ as the first input argument of the ranksum function and then ‘year 1’ as the second input argument and vice-versa?
Thank you very much, Iasonas

 採用された回答

the cyclist
the cyclist 2016 年 12 月 10 日

0 投票

The precise language of the test (which I do think basically agrees with what you've just stated) can be found in the description of the "tail" input, in Name-Value pairs section of the documentation for ranksum.

1 件のコメント

Iasonas
Iasonas 2016 年 12 月 10 日
Thank you very much for the clarification. Best regards, Iasonas

サインインしてコメントする。

その他の回答 (0 件)

質問済み:

2016 年 12 月 10 日

コメント済み:

2016 年 12 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by