MCNEMAR Subcommand (NPAR TESTS command)
NPAR TESTS MCNEMAR=varlist [WITH varlist [(PAIRED)]]
MCNEMAR
tests
whether combinations of values between two dichotomous variables are
equally likely. The output includes a Crosstabulation table for each
pair and a Test Statistics table for all pairs, showing the number
of valid cases, chi-square, and probability for each pair.
Syntax
- The minimum specification is a list of two variables. Variables must be dichotomous and must have the same two values.
- If keyword
WITH
is not specified, each variable is paired with every other variable in the list. - If
WITH
is specified, each variable beforeWITH
is paired with each variable afterWITH
. IfPAIRED
is also specified, the first variable beforeWITH
is paired with the first variable afterWITH
, the second variable beforeWITH
is paired with the second variable afterWITH
, and so on.PAIRED
cannot be specified withoutWITH
. - With
PAIRED
, the number of variables that are specified before and afterWITH
must be the same.PAIRED
must be specified in parentheses after the second variable list.
Operations
- For the purposes of computing the test statistics, only combinations for which the values for the two variables are different are considered.
- If fewer than 25 cases change values from the first variable to the second variable, the binomial distribution is used to compute the probability.
Example
NPAR TESTS MCNEMAR=V1 V2 V3.
- This example performs the
MCNEMAR
test on variable pairs V1 and V2, V1 and V3, and V2 and V3.