# McNemar test (/docs/analyses/mcnemar)



## When to use it [#when-to-use-it]

Use McNemar when the same people are measured twice on a yes/no variable. Only the people who changed contribute to the test. For example: did more people pass after a workshop than before it?

## Assumptions [#assumptions]

Each row is one pair. Both columns are binary. Concordant pairs (no change) do not enter the statistic.

## Running it in Tensr [#running-it-in-tensr]

<Steps>
  <Step>
    Analyze → Descriptive Statistics → Crosstabs. In chat: “McNemar test of before by after.”
  </Step>

  <Step>
    Column A is the first measure and column B is the second.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  column_a: {
    type: 'string',
    description: 'First binary measure.',
  },
  column_b: {
    type: 'string',
    description: 'Second binary measure on the same cases.',
  },
  decimal_places: {
    type: '0–6',
    description: 'Report output. Decimal places.',
    default: '3',
  },
  apa_format: {
    type: 'boolean',
    description: 'Report output. APA-style p-values.',
    default: 'true',
  },
  include_charts: {
    type: 'boolean',
    description: 'Report output. Shared chart switch.',
    default: 'true',
  },
}"
/>

## Reading the output [#reading-the-output]

Eighty people classified yes or no before and after. Discordant pairs were built in both directions in similar numbers.

McNemar test for `before` vs `after`, n = 80 pairs. The primary result is not significant (p = > .999). This is not large enough to treat the comparison this page is about as a reliable association. The result is non-significant: the data are still compatible with no effect. Metrics: Discordant a→b = 5; Discordant b→a = 6; p-value = > .999.

## Reporting (APA 7) [#reporting-apa-7]

McNemar test for `before` vs `after`, n = 80 pairs. This result is not significant (p = > .999). Report the estimate with that p, and do not describe the pattern as a reliable effect.

## Coming from SPSS [#coming-from-spss]

Crosstabs → Statistics → McNemar. The menu label is still on the Analyze menu even though an older retired-label list still names McNemar.
