View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Clinical Test Performance

4.8 | 8 ratings Rate this file 12 Downloads (last 30 days) File Size: 18.6 KB File ID: #12705 Version: 1.15
image thumbnail

Clinical Test Performance



19 Oct 2006 (Updated )

The test calculate the performance of a clinical test based on the Bayes theorem

| Watch this File

File Information

This function calculate the performance, based on Bayes theorem, of a clinical test.
           X is the following 2x2 matrix.
           ALPHA - significance level for confidence intervals (default = 0.05).
           - Prevalence
           - Sensibility and Specificity
           - False positive and negative proportions
           - False discovery and omission rates
           - Youden's Index and Number Needed to Diagnose (NDD)
           - Positive and Negative predictivity
           - Positive and Negative Likelihood Ratio
           - Predictive Summary Index (PSI) and Number Needed to Screen (NNS)
           - Test Accuracy
           - Mis-classification Rate
           - F-Measure
           - Test bias
           - Error odds ratio
           - Diagnostic odds ratio
           - Discriminant Power

Moreover, the function draws two plots (as you can see in the screenshot)

MATLAB release MATLAB 7.6 (R2008a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
23 Feb 2015 Giuseppe Cardillo

this file is an open code: you can modify it as you want providing my aknowledgment

Comment only
21 Feb 2015 Madi

Madi (view profile)

Hi.. can we used this code for multi class problem?

20 Dec 2013 Ronan CIMADURE

07 May 2013 Giuseppe Cardillo

Noam, the message you get is from a previous version of roc.m routine and not from partest.m. When you have a test, using roc curve analysis you can choose a cut-off point (the point above/below which the test is positive) to obtain the max sensitivity or the max specificity or the max cost effective or the max efficiency or the max positive predictive value...and this choosing depends on your specific problem. Actually, I erased partest invoking from roc to simplify the code.

Anyway, Partest asks whether you want to input the true prevalence of a disease or not. Partest uses the Bayes'es Theorem and the true prevalence is needed to correctly apply it

Comment only
05 May 2013 Noam

Noam (view profile)

Thanks for the code.

I looked at the source and didn't find an explanation for the "Choose cut-off to compute performance" message. What does it mean? and what values are relevant?

And one more question: I run partest within a loop and now I need to press enter every time the cut-off message appears. How can set it to run for the same value everytime it runs?

31 Jul 2011 Shu

Shu (view profile)

18 Nov 2010 Giuseppe Cardillo

This is not very clear... Precisely what did you mean? If you open an m.file you always have a text version. To have the plots (did you mean plot when you wrote diagram?) you must run partest on MatLab

Comment only
18 Nov 2010 Dag Nyman

When tying to open the m file, only the textversion comes up. Not the useful diagram. Solution?

15 Nov 2010 Giuseppe Cardillo

You are right, but fp1 and fp2 were swapped also into the routine. I have just uploaded a new version of partest. Thank you

Comment only
12 Nov 2010 Benjamin

Isn't 1-spec equal to false positive rate? I think this is backward on the output partest and roseplot figures (red should be false positive, and yellow should be false negative). In the code it seems like these values (fp1 and fp2) are used correctly throughout and just mis-labelled on the output graphs. Would you mind confirming this? As always, thanks for the excellent code. The comments in this one are really great and I learned a ton going through it.

Comment only
12 Nov 2010 Benjamin

10 Oct 2009 Jan Simon

Jan Simon (view profile)

Exhaustively commented, so you get not only the resulting numbers, but also the exact description of what they mean, if you read the source.

11 Mar 2007 mihai

23 Oct 2006

Improvement in the first line

23 Oct 2006

fix in errors messages

23 Oct 2006

Fix bug in the first line

30 Oct 2006

Error handling improvements

05 Jul 2007

Youden's index and Discriminant Power added

18 Aug 2007

Added new outputs

30 Apr 2008

minor bugs correction

12 Nov 2008 1.1

Changes in help section

15 Dec 2008 1.2

Added a plot of the main results

09 Feb 2009 1.3

Mistake correction in discrimination power formula (Thank you Prof. Hans Winkler!)

27 Jul 2009 1.4

confidence interval for sensibility and specificity added

29 Jul 2009 1.5

Added new 95% confidence intervals for positive and negative predictive values

07 Oct 2009 1.6

Help section was updated; computations are more efficient and output is more rational. Statistics are fully detailed.

23 Dec 2009 1.7

Changes in description

24 Mar 2010 1.8

I added the F-measure and the roseplot

26 Mar 2010 1.9

There was a problem with the previous upload: the m-file was missing

15 Nov 2010 1.10

in plots and results false discovery rates were inverted. The bug is fixed

18 Nov 2010 1.11

I synchronized both plots

17 Sep 2012 1.12

more parameters added

19 Sep 2012 1.13

change in description

06 Oct 2014 1.14

minor improvement in roseplot

07 Oct 2014 1.15

in the roseplot subfunction I wrote axes instead of axis

Contact us