You are viewing documentation for the old version 2.20 of Analyse-it. If you are using version 3.00 or later we recommend you go to the McNemars test.

McNemar test

This procedure is available in both the Analyse-it Standard and the Analyse-it Method Evaluation edition

McNemar test is a non-parametric test for a difference in proportion in two paired dichotomous samples.

The requirements of the test are:

  • Two paired dichotomous samples measured on an ordinal or nominal scale.

Arranging the dataset

Data in existing Excel worksheets can be used and should be arranged in a List dataset layout containing two nominal or ordinal scale variables. The observations of the two variables must be dichotomised by the same groups and criteria. If only a summary of the number of subjects for each combination of the dichotomous groups is available (contingency table) then a 2-way table dataset containing counts can be used. 

When entering new data we recommend using New Dataset to create a new 2 variables (categorical) dataset or 2 x 2 contingency table ready for data entry.

Using the test

To start the test:

  1. Excel 2007:
    Select any cell in the range containing the dataset to analyse, then click Compare Pairs on the Analyse-it tab, then click McNemar
  2. Excel 97, 2000, 2002 & 2003:
    Select any cell in the range containing the dataset to analyse, then click Analyse on the Analyse-it toolbar, click Compare Pairs then click McNemar.

  3. Click Factor A and Factor B and select the variables to compare.
  4. Click Alternative hypothesis and select the alternative hypothesis to test.
  5. X ≠ Y to test if the proportion(X) is not equal to proportion(Y).
    X > Y to test if proportion(X) is greater than proportion(Y).
    X < Y to test if the proportion(X) is less than proportion(Y).
  6. Click OK to run the test.

The report shows the number of observations analysed, and, if applicable, how many missing values were excluded. The number of observations cross-classified by the two factors are shown as a contingency table.

The hypothesis test is shown. The p-value is the probability of rejecting the null hypothesis, that the samples have the same proportion in each group, when it is in fact true. A significant p-value implies that the samples have different proportions in each group. 

METHOD  An exact p-value is calculated using the Binomial distribution (see [2]). The 2-tailed p-value is computed as 2 x 1-tailed p -value.

Difference of proportions point estimate

A point estimate and confidence interval for the difference of proportions between the samples can be useful to evaluate if the difference is practically useful. The point estimate can be expressed as a simple difference of proportions or as an odds-ratio.

To change the point-estimate and confidence interval:

  1. If the McNemar dialog box is not visible click Edit on the Analyse-it tab/toolbar.
  2. Click Point Estimate then selectDifference or Odds-ratio.
  3. Enter Confidence interval for the confidence interval of the difference in proportion. The level should be entered as a percentage between 50 and 100, without the % sign.
  4. Click OK.

The point estimate expressed as a simple difference or an odds-ratio and confidence interval are shown.

METHOD  The confidence interval for the point estimate when expressed as a difference is computed using the exact Binomial distribution (see [2]). When expressed as an odds-ratio the logit Normal approximation is used (see [3]).

Further reading & references

  1. Handbook of Parametric and Nonparametric Statistical Procedures (3rd edition)
    David J. Sheskin, ISBN 1-58488-440-1 2003; 633.
  2. Practical Non-parametric Statistics (3rd edition).
    Conover W.J. ISBN 0-471-16068-7 1999; 166-170.
  3. Statistics with Confidence (2nd edition)
    Gardner M.J., Altman D.G. ISBN 0-7279-1375-1 2000; 50-54.