# Contigency table test unbalanced data

I analyse clinical data of rare diseases and an associated test which is an indicator for the disease.

N(case,test=positive) = 5
N(control,test=positive) = 1
N(case,test=negative) = 49
N(control,test=negative) = 51

Note:

• Positive tests are rare but an accepted indicator

A Fisher-Exact-Test Pvalue is not significant on the given data. Can I use another, maybe permutation-based test, to better quantify the difference between P(case|test=pos) = 0.83 P(control|test=pos) = 0.16

The Fisher's exact test does not account for classifying one subject by two characteristics. In this case, you want to understand whether the test agrees with the diagnosis.

To describe the data, first estimate the sensitivity (5/54) and specificity (51/52). These values suggest the test is poor at ruling out disease (sensitivity = 9%, false-negative rate 91%) and better at ruling in disease (specificity 98%, false-positive rate 2%).

To determine whether this table is due to change or holds some diagnostic information, we can invoke McNemar's change test. In R:

dx_table <- matrix(c(5,1,49,51), nrow=2, ncol=2, byrow=T)
mcnemar.test(dx_table)


This yields a p-value <0.0001 and we can reject the null hypothesis if using a standard alpah of 0.05 or less. The null of the McNemar's test is marginal homogeneity or, in this case, absence of diagnostic information. Rejecting the null allows us to support the conclusion that the diagnostic test is better than random chance, but does not inform as to whether the test is useful.

In my opinion, a false-negative rate of 91% suggest the test is worse than useless for ruling out disease. For a rare disease this is a terrible situation. Some persons advocate use of the negative predictive value (51/100) for test assessment, which is still below threshold for clinical use in most scenarios. The positive predictive value (5/6) is favorable at 83%. However, the NPV and PPV are subject to the prevalence of the disease in the population undergoing testing, while the sensitivity and specificity are not.