Questions tagged [mcnemar-test]

A test for dependent categorical data, such as yes/no data before & after a treatment. The McNemar-Bowker test generalizes McNemar's test for $k>2$ categories. The tests assess whether the population proportions in each pair of corresponding symmetric cells are equal.

McNemar's test is a test for dependent categorical data. Given two variables with $2$ categories (McNemar's test) or $k$ categories (McNemar-Bowker test) that form a square contingency table, the tests assess whether the population proportions in every off-diagonal cell is equal to that in the corresponding symmetric cell.

148 questions
37
votes
4 answers

What is the difference between McNemar's test and the chi-squared test, and how do you know when to use each?

I have tried reading up on different sources, but I am still not clear what test would be the appropriate in my case. There are three different questions I am asking about my dataset: The subjects are tested for infections from X at different…
Anto
  • 693
  • 1
  • 8
  • 13
16
votes
2 answers

Relationship between McNemar's test and conditional logistic regression

I am interested in the modeling of binary response data in paired observations. We aim to make inference about the effectiveness of a pre-post intervention in a group, potentially adjusting for several covariates and determining whether there is…
AdamO
  • 52,330
  • 5
  • 104
  • 209
13
votes
2 answers

Why does the McNemar's test use $\chi^{2}$ and not the normal distribution?

I just noticed how the non exact McNemar's test uses the $\chi^{2}$ asymptotic distribution. But since the exact test (for the two case table) relies on the binomial distribution, how come it is not common to suggest the normal approximation to the…
12
votes
3 answers

Importance of McNemar test in caret::confusionMatrix

There are many metrics to evaluate the performance of predictive model. Many of these appear relatively straightforward to me (e.g. Accuracy, Kappa, AUC-ROC, etc.) but I am uncertain regarding the McNemar test. Could someone kindly help me…
cdeterman
  • 4,543
  • 1
  • 20
  • 34
9
votes
4 answers

Fisher exact test on paired data

Given $40$ cases with lung cancer and $40$ matched controls (without lung cancer) (matching based on age, sex, etc.). To try to find evidence between the effect of smoking on lung cancer, I used Fisher's exact test on the contingency table. This…
7
votes
1 answer

McNemar or Fisher exact test for propensity score matched data?

I want to analyze some propensity score matched data. In the literature McNemar test is usually used, since the data is "paired". However matching is not pairing in the common sense. Would it be more correct to use Fisher exact test? What opinions…
Viktor
  • 853
  • 1
  • 8
  • 22
6
votes
1 answer

McNemar-Bowker test for comparison of two measures

I am comparing two versions of a survey (an original, and a modified) and was wondering if the McNemar-Bowker test is appropriate. The survey(s) ask respondents to indicate whether they've had an experience (in this case, unwanted sexual contact)…
Walter
  • 175
  • 1
  • 2
  • 12
6
votes
2 answers

Can Cramér's V be used an effect size measure for McNemar's test?

I'm using McNemar's exact test (with R's "mcnemar.exact" function). I know that giving the odds ratio or proportion would be an adequate measure of effect size (Effect size of McNemar's Test), but I was explictly asked to report Cramér's V. Is…
6
votes
2 answers

Compare a diagnostic test to gold standard

I have a sample of patients who underwent 2 diagnostic tests, one of which is the gold standard. I've been asked to test if the diagnosis from the experimental test is different than the one from the gold standard. Here is the contingency table: >…
6
votes
3 answers

Why aren't the diagonal counts used in McNemar's test?

In reviewing McNemar's test, I see that the diagonal counts aren't used in computing the test statistic. However, since the test is testing the null that the row and column marginals are equal, testing $H_0\! : p_b \stackrel ? = p_c$ seems to be…
ted
  • 551
  • 3
  • 12
5
votes
1 answer

Sample size function for McNemar test of repeated proportions in R

I have been scouring CRAN and Google for a function (that I wouldn't have to code myself) that would calculate the sample size needed for a pre-post design with a dichotomous outcome - to no avail. If I'm wrong, please let me know! I came across an…
MegPophealth
  • 325
  • 2
  • 8
5
votes
1 answer

One-sided McNemar's test

In R, the function mcnemar.test has the following example: ## Agresti (1990), p. 350. ## Presidential Approval Ratings. ## Approval of the President's performance in office in two surveys, ## one month apart, for a random sample of 1600 voting-age…
thc
  • 388
  • 2
  • 16
5
votes
2 answers

Can McNemar's test be improved upon by adjustments for zeros like those in a sign test?

McNemar's test is a special example of the binomial sign test, but the ('vanilla') sign test suffers from bias due to ignoring differences equal to zero. McNemar's test statistic is given by: $\chi^{2} = \frac{\left(|r-s|-1\right)^{2}}{r+s}$, where…
Alexis
  • 26,219
  • 5
  • 78
  • 131
4
votes
1 answer

Can I perform a McNemar's test with only proportion and denominator information?

I have the following count and denominator information. The 630 subjects are the same people over two different periods of time. Can I conduct a McNemar's test to compare the dependent proportion difference? Or does it have to be in a 2x2 table…
KubiK888
  • 927
  • 1
  • 10
  • 21
4
votes
1 answer

What is the Bayesian counterpart to the McNemar test (of marginal homogeneity)?

In analogy to a similar post on continuous data, I ask the following. In paired discrete data, we test the frequentist hypothesis of equivalent marginal distributions of two discrete variables $X$ and $Y$ with the McNemar test. For example when both…
tomka
  • 5,874
  • 3
  • 30
  • 71
1
2 3
9 10