Hello,
When calling signrank(x) in the R2011b version, 0s values in x do not seem to be omitted anymore as in previous releases. These values should indeed be ignored when computing the signed rank statistics ( http://faculty.vassar.edu/lowry/ch12a.html ). Let me give two examples, with and without 0s, which should theoretically give the same result if I understood well:
signrank([-5 -6 -7 -8 -4 2 -10])
ans =
whereas
signrank([-5 -6 -7 -8 -4 2 -10 0 0 0])
ans =
... And the result becomes different depending on whether the bias is for positive or negative values, while it should not be, because the test should be two sided: indeed:
signrank(-[-5 -6 -7 -8 -4 2 -10 0 0 0])
ans =
Using a previous version of matlab (R2007b) as well as the statistical package R (<http://www.r-project.org/>) with the same vectors, I saw that:
1) all the p-values stay close to the p-value given by R2011b for the vector where 0s are manually removed (first example I gave)
2) the p-values they give are independent on the sign of the bias, as it should be.
Could this be a bug, or am I doing something wrong ?