基本上找到答案了,SPSS与SAS中关于McNemar检验的说明如下:
(1)Spss
McNemar's Test (nonparametric tests algorithms)
For two related samples from a categorical field with 2 values (or a recoded categorical field with more than 2 values), this tests:
H0: The two samples have the same marginal distribution.
Let n1,f be the number of records in which xi is a success and yi is a failure, and n2,f be the number of records in which xi is a failure and yi is a success, incorporating the frequency weights.
The one sided p-value is
p=Pr(χ21≥χ2)=1−Pr(χ21≤χ2)
where χ21 has a chi-square distribution with 1 degree of freedom.
p<α will reject the null hypothesis.
(2)SAS
McNemar’s Test
PROC FREQ computes McNemar’s test for 2 *2 tables when you specify the AGREE option. McNemar’s test is appropriate when you are analyzing data from matched pairs of subjects with a dichotomous (yes-no) response. It tests the null hypothesis of marginal homogeneity, or p1. = p.1. McNemar’s test is computed as
QM = (n12 - n21)^2/ (n12 + n21)
Under the null hypothesis, QM has an asymptotic chi-square distribution with one degree of freedom. See McNemar (1947), as well as the general references cited in the preceding section. In addition to the asymptotic test, PROC FREQ also computes the exact p-value for McNemar’s test when you specify the MCNEM option in the EXACT statement.