First of all, I would like to thank the authors for sharing this file. I am using the McNemar test to compare two classifiers, as suggested in (Kuncheva, Combining Patten Classifiers, 2004; and Guyon et al, Feature Extraction - Foundations and Applications, 2006). However I would like to raise a few points:
1) In a one-tailed test, the p-value should be halved, not the significance level against which the p-value is compared. Check the source code for the ttest() function and you will see an example of correct implementation of one-tailed test;
2) A one-tailed test should give a different p-value if the input is swapped, which in this case means swapping the second and third element of the "v" input. The implementation of the one-tailed version is INCORRECT (I am still looking for a way to implement a one-tailed McNemar test)
3) The second part of the program is displaying the "P" variable (calculated in the first part) when it should be displaying the "p" variable
Hi
The error prevention in the beginning is rejecting the (1x1, 1x1) case. To make it work in this case one can simply add an equal ('=') sign to line 20 and it will be as below:
elseif x(1) <= x(xLen) % means x is in ascending order