Thank you for the responses. I do think there is a bug in computing the zval in signrank. It always gives negative values. Walter, you are right about the sign of z-values. But in matlab, it gives the same zvals even when I compute
[p,h,stats]=signrank(1:50,3:52)
[p,h,stats]=signrank(3:52,1:50),
which should definitely result in positive and negative z-val... But I checked several examples and found out that the absolute values of Matlab's zvals are correct. So only the sign is off.
