Hello everyone,
I'm trying to use the wilcoxonsignedranktest in C++ but no success. In fact, it works but show incorrect values. Take a look in my test code:
Code:
double mean;
double variance;
double skewness;
double kurtosis;
double both, left, right;
real_1d_array x = "[1,2,3,4,5,6,7,8,9,10]";
samplemoments(x, mean, variance, skewness, kurtosis); //mean = 5.50
wilcoxonsignedranktest(x, 10, mean, both, left, right);
The
both returns 0.999952818327035 for me.
I did the same in R and get:
Code:
> wilcox.test(1:10)
Wilcoxon signed rank test
data: 1:10
V = 55, p-value = 0.001953
alternative hypothesis: true location is not equal to 0
Then
0.999952818327035 is different from
0.001953Do you know where is the problem???
Thanks!