1

I would like to compare the false positive rates (1 - specificity) from two different tests within the same sample. The false positive rate is calculated by comparing the test values against the actual prevalence of disease.

Test 1 has a false positive = 17.1% Test 2 has a false positive = 15.5%

I believe I am supposed to use the McNemar's test but I can't figure out how to set up the two by two table.

Thank you!

JHugh
  • 11
  • 3

1 Answers1

1

The false-positive rate is

$$\small \text{FPR}=\frac{\text{FP}}{\text{FP + TN}}$$

This would be some simulated data set of $187$ participants with the same percentages as in the OP:

> mat = as.table(rbind(c(23, 9), c(6, 149) ))
> colnames(mat) <- rownames(mat) <- c("False Positive", "True Negative")
> names(dimnames(mat)) = c("Test A", "Test B")
> mat
                Test B
Test A           False Positive True Negative
  False Positive             23             9
  True Negative               6           149
> addmargins(mat)
                Test B
Test A           False Positive True Negative Sum
  False Positive             23             9  32
  True Negative               6           149 155
  Sum                        29           158 187
> pr.mat = prop.table(mat)
> round(addmargins(pr.mat),3)
                Test B
Test A           False Positive True Negative   Sum
  False Positive          0.123         0.048 0.171
  True Negative           0.032         0.797 0.829
  Sum                     0.155         0.845 1.000
> mcnemar.test(mat)

    McNemar's Chi-squared test with continuity correction

data:  mat
McNemar's chi-squared = 0.26667, df = 1, p-value = 0.6056

So you are really testing for the off-diagonal differences: the proportions of healthy individuals in which there was discrepancy with one of the tests being false positive, while the other was true negative. The idea is for the $2\times2$ contingency table to be populated with count data.

Antoni Parellada
  • 23,430
  • 15
  • 100
  • 197
  • I think you did answer the question +1, also similar Q/A elsewhere https://stats.stackexchange.com/a/274882/99274 – Carl Apr 20 '17 at 23:52