﻿ McNemar’s Chi-Square Test

# McNemar’s Chi-Square Test

### Statistics > Basic Statistics > Chi-Square > McNemar’s Test

Test that the probability to be in cell [i,j] is the same as to be in cell [j,i].

This procedure computes McNemar's test for 2×2 tables. McNemar's test is appropriate when you are analyzing data from matched pairs of subjects with a dichotomous (yes-no) response. It tests for marginal homogeneity, or a null hypothesis of p1• = p•1. McNemar's test is computed as

Under the null hypothesis, QM has an asymptotic chi-square distribution with one degree of freedom.

### Dialog box items

Rows:
Select the variables displayed in rows in the crosstabulation. Selected variables should be factors with at leat two levels. A crosstabulation is produced for each combination of row and column variables.

Columns:
Select the variables displayed in columns in the crosstabulation. Selected variables should be factors with at least two levels. A crosstabulation is produced for each combination of row and column variables.

DataSet is a Contingency Table:
Select if the data set specified is a contingency table.

Report:
The display of outputs of VisualStat.

### Data

To use Cross Tabulation, your data should be categorical. To define the categories of each table variable, use values of a numeric or short string (eight or fewer characters) variable. For example, for gender, you could code the data as 1 and 2 or as male and female.

### Statistics

Measures of Association
Describes the association between the two variables of the contingency table

oCramer's V: Check to display Cramer's V coefficient.

oPhi Coefficient: Check to display Phi Coefficient.

oContingency Coefficient: Check to display Contingency Coefficient.

oKappa Coefficient: Check to display Kappa Coefficient.

oObserved values: Check to display each cell's observed count.

### Options

Apply Continuity Correction: Check to apply Yates’ correction for continuity.

Confidence Level: Enter the level of confidence desired. Enter any number between 0 and 100. Entering 90 will result in a 90% confidence interval. The default is 95%.

### Example

The data show test scores for 34 children in two class (1 or 2). The child's gender ("male" or "female") and grade (4, 5, or 6) is also recorded.

1.Open the DataBook summary.vstz

2.Select the sheet crosstab

3.Choose the tab Statistics, the group Basic Statistics and the command McNemar’s Test

4.In Rows, select Gender. In Columns, select Class

5.Click OK

Report window output

McNemar’s Chi-Square Test

without continuity correction

Null hypothesis under test >>>  Independence of the rows and columns

data:  Gender and Class from data sheet summary.vstz

NB                 34

McNemar's Chi2     0.0435

Degree of freedom  1

p-value            0.8348

alpha-level        0.05

Critical Value     3.8415

Conclusion         Accept the Null Hypothesis

Interpreting the results

No evidence exists for association (p = 0.8348) between gender and class attachment.