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.

Filter by
Sorted by
Tagged with
43 votes
4 answers
61k views

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 ...
Anto's user avatar
  • 763
16 votes
3 answers
13k views

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 ...
cdeterman's user avatar
  • 5,101
16 votes
2 answers
4k views

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 ...
AdamO's user avatar
  • 62.7k
13 votes
2 answers
4k views

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 ...
Tal Galili's user avatar
  • 21.6k
10 votes
4 answers
7k views

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 ...
Gert's user avatar
  • 213
8 votes
1 answer
2k views

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 ...
Viktor's user avatar
  • 1,007
7 votes
1 answer
15k views

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 ...
Walter's user avatar
  • 185
6 votes
3 answers
1k views

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, ...
ted's user avatar
  • 641
6 votes
2 answers
3k views

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 ...
Tobias B.'s user avatar
  • 105
6 votes
2 answers
5k views

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 ...
Dan Chaltiel's user avatar
  • 1,430
6 votes
1 answer
3k views

McNemar test with multiple scores for the same subject

I am having a statistical issue: subjects receive a test with machine A and machine B. 3 experts classify whether the results of machine A and machine B are acceptable (1) or not (0). From my ...
Hendrik's user avatar
  • 83
5 votes
2 answers
926 views

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^{...
Alexis's user avatar
  • 29.9k
5 votes
1 answer
4k views

One-sided McNemar's test

In R, the function mcnemar.test has the following example: ...
thc's user avatar
  • 408
5 votes
1 answer
1k views

Proper analyses for 2x2 contingency tables

So I have multiple questions about the different types of analyses that can be used on a 2x2 contingency table and when different analyses should be used. To open, I'll note that this stems from my ...
Patrick Rich's user avatar
5 votes
1 answer
3k views

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 ...
MegPophealth's user avatar
4 votes
2 answers
9k views

How to calculate information included in R's confusion matrix

I want know the formulas for the information highlighted in the confusion matrix in the picture below:
conan nhoc's user avatar
4 votes
3 answers
3k views

McNemar's test p-value NA

I have paired data from 9 individuals. The response variable is ordinal with levels 1-5. As the sample is very small and the data are categorical, I thought the appropriate test was McNemar's test. ...
Mik meadow's user avatar
4 votes
2 answers
2k views

Is the binomial sign test really the exact McNemar test?

I am calculating two different $p$ values for the McNemar test and what I believe is the corresponding exact test, even for combined counts larger than 25. Take, for example the contingency table <...
BMS's user avatar
  • 155
4 votes
1 answer
151 views

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 ...
KubiK888's user avatar
  • 1,167
4 votes
1 answer
501 views

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 ...
tomka's user avatar
  • 6,582
4 votes
1 answer
787 views

Contingency table for gene groups

I have two lists of genes as follows: DEList has 282 gene names AllList has 32805 gene names ...
Assa Yeroslaviz's user avatar
4 votes
0 answers
288 views

Does conditional logistic regression effectively "throw away" concordant pairs like McNemar's test?

We are interested in analyzing pre-post data from a randomized control trial. The outcome is binary and I am trying to explain the heuristics of the model formulation for conditional logistic ...
AdamO's user avatar
  • 62.7k
3 votes
2 answers
7k views

Determine if two proportions from the same sample are different

Is there a test I can use to compare two proportions from the same sample that are not mutually exclusive? For example, I would like see if the proportion of people that answered "yes" to a ...
user42087's user avatar
3 votes
2 answers
497 views

Replacing McNemar test with regression?

Would it be possible to replace the McNemar test with regression? What would be the regression formula? What type of regression should be used (logistic?, some survival?)? Let's have a made-up example ...
ethan282712's user avatar
3 votes
1 answer
152 views

If we use McNemar's for single case data, is pseudoreplication an issue?

I have a query about McNemar's test. As far as I understand, the technique assumes that cells are independent. It tends to be used with group studies whereby counts refer to individuals, for example a ...
Nick Riches's user avatar
3 votes
2 answers
349 views

Is McNemar's Test Appropriate Here?

I am applying two diagnostic tests with dichotomous outcomes (condition present yes/no) to a sample of patient data. Both take into account a range of vital parameters and produce a test result, which ...
user avatar
3 votes
2 answers
306 views

McNemar's test probably does not work, but what could?

I have a dataset of people who had back-to-back procedures and I have the whether or not polyps (precancerous lesions) removed during each procedure. ...
radishhorse's user avatar
3 votes
1 answer
2k views

McNemar's test vs chi-squared test for before & after data with different people from the same population

I have 2 proportions I want to compare. They are from the same population but at different time periods, in between which there was an intervention. H0: Proportion in Period#1 = Proportion in Period#...
Paris Char's user avatar
3 votes
1 answer
2k views

Why Yates correction in McNemar's Test subtract 1?

McNemar's test statistic is given by: Yates's correction defines something like this: However, the correction for the McNemar's test statistic requires 1 (not 0.5)...
SmallChess's user avatar
  • 7,211
3 votes
1 answer
98 views

Which test should I use to assess for the statistical signficance of changes in multiple binomial dependent variables from T1 to T2?

Students have completed a test containing 20 questions at both T1 and T2, with an intervention in the interval. Scores for each question are either 0 (incorrect) or 1 (correct). I am interested in ...
Joe's user avatar
  • 31
3 votes
1 answer
41 views

Comparing classifications based on different features with McNemar test

I have a classification task where I need to classify several land cover classes (such as forest, grass, water, etc.) based on two different sets of features (predictors). The first set of features ...
ABC's user avatar
  • 183
3 votes
1 answer
158 views

McNemar's Test for repeated sex ratio data

I have proportion data (sex ratio of a dioecious plant) for a population that was measured three times. I would like to know if a McNemar's Test is the most appropriate analysis to answer the question:...
Lucero Sevillano's user avatar
3 votes
0 answers
319 views

Alternatives to Chi-square test when observations are dependent

I have cross-tabulated some data from a survey. The core survey questions have been cross-tabulated with demographic variables. I am looking at these cross-tabulations to see if any interesting trends ...
GaryStats's user avatar
3 votes
0 answers
48 views

Does sampling fraction matter for McNemar's Test?

For McNemar's Test, does the sample need to be less than 1/20 of the population if the sample is without replacement? If so, can I correct for a sample that is larger than 1/20 of the population by ...
John Doe's user avatar
3 votes
1 answer
1k views

Comparing classifiers using McNemar Test

When comparing the performance of two binary classifiers using McNemar test, should the two confusion matrices of the models be based on the training set, the validation set, or even a second ...
salvador's user avatar
  • 147
3 votes
0 answers
2k views

Chi-square test vs. McNemar's test - which test is right for this highly usual situation?

Here is, I would assume, a fairly common situation: I would like to know which test to use to assess whether the tendency to answer "Yes" on question 1 of a questionnaire is associated with ...
NamelessAmos's user avatar
3 votes
0 answers
565 views

Pearson's chi-squared test assumption: independence of observations

I am unsure of how to establish (or interpret) the independence condition of the chi-squared test in (for instance) the following situation. Consider this 2x2 contingency table representing the ...
BrechtDeMan's user avatar
3 votes
1 answer
382 views

Which test to use? Repeated measures with binary outcomes

I would like your opinion about which analyses to use for the research question. I've got a repeated measures with binary data. N = 20 H0 = there is no difference between pre and post measurement ...
user143223's user avatar
2 votes
2 answers
6k views

Which test to choose when Wilcoxon test and McNemar's test are different?

I have paired data.The response variable is categorical with levels 1-5. And I have used both McNemar's test and Wilcoxon rank sign test and I get different p-values. For McNemar's test a p-value of 0....
Mik meadow's user avatar
2 votes
1 answer
565 views

McNemar test comparing two proportions in a crossover trial

In a crossover trial involving 50 patients, two dialysis treatment schedules were compared.Ten patients complained of vomiting on both schedules, 30 on neither, nine on treatment A only and one on ...
Art's user avatar
  • 107
2 votes
1 answer
6k views

Paired comparison chi square

I have a question related to the use of chi square test for paired data. I have read that McNemar tests would be an option but in some software like R it works only for 2x2 data (may be I do not know ...
user12257's user avatar
2 votes
3 answers
1k views

Hypothesis test for intervention with class imbalance before intervention. Alternative to McNemar

I want to assess an intervention to cure a disease. An example is described by the following matrix: ...
JPCampos's user avatar
2 votes
1 answer
2k views

Comparing two decision models using McNemar's test

I'm trying to compare the performance of two classification algorithms. Thanks to CrossValidated, I already know that the best way to do this is via McNemar's test. I performed this, and sure enough, ...
su kas's user avatar
  • 23
2 votes
1 answer
1k views

Compare classification performance of two heuristics

I want to compare the classification performance of two heuristics: $h_0$ and $h_1$. I have around 700 samples for which I know the output class $c$ and the results of the two heuristics $c_{\textit{...
user avatar
2 votes
1 answer
34 views

Statistical test for PCR and bacterial culture with two different testing methods

I have previously used McNemar's test to compare PCR and bacterial culture using the same sample. I now have two different samples from the same patient taken from tonsills and quincy. So I now have 4 ...
user357727's user avatar
2 votes
1 answer
524 views

Chi Square test or McNemar test?

I've got a set of 1000 patients and I am measuring two different blood values (CRP and IL6) and choosing a categorical cutoff values for both (CRP>10 and IL6 >2). I now would like to know if there is ...
R-Testerr's user avatar
2 votes
1 answer
8k views

Fisher's exact test in 2x3 contingency table

I have a dataset with birds that were exposed to pesticides. The summary of this data looks like: ...
Liza's user avatar
  • 121
2 votes
1 answer
2k views

comparing proportions before and after two different interventions

I am trying to compare the proportions before and after TWO interventions in a small sample. Basically, 10 people had intervention A, and I want to compare proportions of their success rate before ...
BretzelPretzel's user avatar
2 votes
1 answer
229 views

Bayes Factors for McNemar Test

I am currently analyzing data from a within-subjects study in which all participants completed a standard and experimental task. Responses were binary (pass = 1; fail = 0). I believe that the ...
Nahal Kamkar's user avatar
2 votes
1 answer
336 views

Test if treatment effect is different between samples

I want to determine if there is significant variation in the effect of a treatment amongst my replicates. The treatment effect is measured as a proportion. Let me describe: I study heart defects (in ...
Ehi Akhirome's user avatar