It will be useful if output argument feature is added, like following:
function res = McNemarextest(v, t, alpha)
...
if t==1
if P>alpha
res = 0;
else
if b>d, res=1; else res=-1; end
end
else
if P>alpha
res = 0;
else
res = 1;
end
end
In this way, res will be:
in 2-tailed test, 0 if not significant, 1 if significant
in 1-tailed test, 0 if not significant, 1 if b>d significantly, -1 if b<d significantly.
The version of the code (ktaub.m) downloaded on July 20 2011, gives a parse error for the following lines.
[~,b] = unique(ro1);
[~,e] = unique(ro2);
How can this parse error be fixed?
Comment only