1
$\begingroup$

Is it possible to reconstruct a 2X2 confusion matrix (TP, TN, FP, FN) from Sensitivity, Specificity, Positive Predictive Value, and Negative Predictive Values. I also have prevalence according to the reference test.

Ideally just using Se and SP, as all studies report this.

Thank you in advance

Barrie

$\endgroup$
  • $\begingroup$ Do you have the total $N$? $\endgroup$ – mdewey Oct 4 '18 at 15:17
1
$\begingroup$

With a fixed number of total cases N and 4 cells in the confusion matrix needing numbers of cases, you need to have 3 different additional sources of information.

It's important to distinguish between the number of TP, TN, FP, and FN cases and the corresponding rates. Putting together this answer about what you can do with the True Positive Rate (same as Sensitivity) and the False Positive Rate, with this answer to a related question on Precision (also a rate) and Recall (same as Sensitivity), shows what you can do just with Specificity (True Negative Rate) and Sensitivity, which is what you would "ideally" like to be able to do.

As the above answers and the Wikipedia page on evaluating binary classifiers show, with the standard definitions the false negative rate, FNR, is simply given by

FNR = 1 - Sensitivity

as the denominator in both measures is the number of cases with Condition Positive (CP).

Similarly, the false positive rate, FPR, is simply given by

FPR = 1- Specificity

as the denominator in both measures is the number of cases with Condition Negative (CN).

That's as far as you can get with only Specificity and Sensitivity. As the Wikipedia page notes, these measures are independent of prevalence (CP/N), which is a third source of information that can be used to place case numbers into the confusion matrix.

Knowing the prevalence among the actual number of cases, N, would be best, but if you have a reasonable estimate of prevalence "according to the reference test" then you could use the prevalence to get estimated values for CP and CN for any given N, then use those numbers with the rates as calculated above to fill in the matrix with the numbers of cases. You could proceed to use that matrix to calculate all the other measures used in binary classification, like Precision, Positive and Negative Predictive Values, etc., as shown in the Wikipedia page linked above.

That said, none of these measures is necessarily a good way to evaluate a classification model. This answer gives some introduction to that issue, with links to more complete discussion.

$\endgroup$
  • $\begingroup$ Thanks a million EdM for detailing the above approach. Your caution that none of the resulting measures are ideal ways to arriving at TP TN FP FN is not very assuring. I am performing a meta analysis that will hopefully be used to inform decision making. So precising is important. I will go through the links you gave and the method and will report back on the outcome. Thanks again Ed $\endgroup$ – Barrie Oct 5 '18 at 10:53
  • $\begingroup$ Also came across this today: link $\endgroup$ – Barrie Oct 5 '18 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.