Why is Matlab signrank function returns the same signed rank statistic values when flipping the signs of the data points?
조회 수: 5 (최근 30일)
이전 댓글 표시
Why is Matlab signrank function returns the same signed rank statistic values when flipping the signs of the data points?
I have a sequence of data points stored in vector x. I use signrank(x) to do sign rank test.
Matlab says
When you use the test for one sample, then W is the sum of the ranks of positive differences between the observations and the hypothesized median value M0 (which is 0 when you use signrank(x) and m when you use signrank(x,m)).
So I think the result signrank(x) and signrank(-x) should be different. But I have experienced some examples, and I get the same sign rank statistic value for x and -x. How is the signed rank statistic defined in Matlab signrank function?
Thanks!
댓글 수: 0
답변 (1개)
Armando Angulo
2017년 11월 23일
I don't Know how matlab computes signrank, but the result it should be the same for x and -x because probability is compute with the smallest values of the independent sum of negative and positive ranks. So, in case x: negative sum = 8 positive sum = 16 you take 8 as W stat for compute p value
In contrast, in case -x: negative sum = 16 positive sum = 8 you take 8 as W stat for compute p value
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!