Uncertainty of Measurement and Diagnostic Accuracy Measures

Aristides T. Hatjimihail, MD, PhD
 ath@hcsl.com

Hellenic Complex Systems Laboratory, Kostis Palamas 21, 66131 Drama, Greece.

Initialization Code

sens[x_,μD_,μH_,σD_,σH_,u_]:=
1-CDF[NormalDistribution[μD,(Sqrt[((σD)^2)+(u^2)])],InverseCDF[NormalDistribution[μH,(Sqrt[((σH)^2)+(u^2)])],x]];
spec[x_,μD_,μH_,σD_,σH_,u_]:=
CDF[NormalDistribution[μH,(Sqrt[((σH)^2)+(u^2)])],InverseCDF[NormalDistribution[μD,(Sqrt[((σD)^2)+(u^2)])],1-x]];

dppv[x_,μD_,μH_,σD_,σH_,pd_,u_]:=((x pd)/(x pd+(1-spec[x,μD,μH,σD,σH,u])(1-pd)));
dnpv[x_,μD_,μH_,σD_,σH_,pd_,u_]:=((spec[x,μD,μH,σD,σH,u](1-pd))/(spec[x,μD,μH,σD,σH,u](1-pd)+(1-x)pd));

dor[x_,μD_,μH_,σD_,σH_,u_]:=((x/(1-x))/((1-spec[x,μD,μH,σD,σH,u])/(spec[x,μD,μH,σD,σH,u])));
dplr[x_,μD_,μH_,σD_,σH_,u_]:=(x/(1-spec[x,μD,μH,σD,σH,u]));
dnlr[x_,μD_,μH_,σD_,σH_,u_]:=((1-x)/(spec[x,μD,μH,σD,σH,u]));

hppv[x_,μD_,μH_,σD_,σH_,pd_,u_]:=((sens[x,μD,μH,σD,σH,u]pd)/(sens[x,μD,μH,σD,σH,u]pd+(1-pd)(1-x)));
hnpv[x_,μD_,μH_,σD_,σH_,pd_,u_]:=((x(1-pd))/(x(1-pd)+pd(1-sens[x,μD,μH,σD,σH,u])));

hor[x_,μD_,μH_,σD_,σH_,u_]:=(((sens[x,μD,μH,σD,σH,u])/(1-sens[x,μD,μH,σD,σH,u]))/((1-x)/x));
hplr[x_,μD_,μH_,σD_,σH_,u_]:=((sens[x,μD,μH,σD,σH,u])/(1-x));
hnlr[x_,μD_,μH_,σD_,σH_,u_]:=((1-sens[x,μD,μH,σD,σH,u])/x);

Manipulate[
Which[
type==0,
Which[
vs==0,
Which[
plot==0,
Plot[{Tooltip[dppv[x,μD,μH,σD,σH,pd,u1],"PPV curve of 1st test"],Tooltip[dppv[x,μD,μH,σD,σH,pd,u2],"PPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","PPV"},PlotLabel->Row[{"PPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[dnpv[x,μD,μH,σD,σH,pd,u1],"NPV curve of 1st test"],Tooltip[dnpv[x,μD,μH,σD,σH,pd,u2],"NPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","NPV"},PlotLabel->Row[{"NPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[dor[x,μD,μH,σD,σH,u1],"odds ratio curve of 1st test"],Tooltip[dor[x,μD,μH,σD,σH,u2],"OR curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","OR"},PlotLabel->Row[{"OR curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[dplr[x,μD,μH,σD,σH,u1],"LR+ curve of 1st test"],Tooltip[dplr[x,μD,μH,σD,σH,u2],"LR+ curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","LR+"},PlotLabel->Row[{"LR+ curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[dnlr[x,μD,μH,σD,σH,u1],"LR- curve of 1st test"],Tooltip[dnlr[x,μD,μH,σD,σH,u2],"LR- curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","LR-"},PlotLabel->Row[{"LR- curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}]
],
vs==1,
Which[
plot==0,
Plot[{Tooltip[hppv[x,μD,μH,σD,σH,pd,u1],"PPV curve of 1st test"],Tooltip[hppv[x,μD,μH,σD,σH,pd,u2],"PPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","PPV"},PlotLabel->Row[{"PPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[hnpv[x,μD,μH,σD,σH,pd,u1],"NPV curve of 1st test"],Tooltip[hnpv[x,μD,μH,σD,σH,pd,u2],"NPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","NPV"},PlotLabel->Row[{"NPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[hor[x,μD,μH,σD,σH,u1],"OR curve of 1st test"],Tooltip[hor[x,μD,μH,σD,σH,u2],"OR curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","OR"},PlotLabel->Row[{"OR curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[hplr[x,μD,μH,σD,σH,u1],"LR+ curve of 1st test"],Tooltip[hplr[x,μD,μH,σD,σH,u2],"LR+ curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","LR+"},PlotLabel->Row[{"LR+ curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[hnlr[x,μD,μH,σD,σH,u1],"LR- curve of 1st test"],Tooltip[hnlr[x,μD,μH,σD,σH,u2],"LR- curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","LR-"},PlotLabel->Row[{"LR- curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Bottom,ImageSize->{350,375}]
]
],
type==1,
Which[
vs==0,
Which[
plot==0,
Plot[{Tooltip[D[dppv[x,μD,μH,σD,σH,pd,u],u]/.{u->u1},"(∂/(∂u))PPV curve of 1st test"],Tooltip[D[dppv[x,μD,μH,σD,σH,pd,u],u]/.{u->u2},"(∂/(∂u))PPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","(∂/(∂u))PPV"},PlotLabel->Row[{"(∂/(∂u))PPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[D[dnpv[x,μD,μH,σD,σH,pd,u],u]/.{u->u1},"(∂/(∂u))NPV curve of 1st test"],Tooltip[D[dnpv[x,μD,μH,σD,σH,pd,u],u]/.{u->u2},"(∂/(∂u))NPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","(∂/(∂u))NPV"},PlotLabel->Row[{"(∂/(∂u))NPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[D[dor[x,μD,μH,σD,σH,u],u]/.{u->u1},"(∂/(∂u))OR curve of 1st test"],Tooltip[D[dor[x,μD,μH,σD,σH,u],u]/.{u->u2},"(∂/(∂u))OR curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","OR"},PlotLabel->Row[{"(∂/(∂u))OR curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[D[dplr[x,μD,μH,σD,σH,u],u]/.{u->u1},"(∂/(∂u))LR+ of 1st test"],Tooltip[D[dplr[x,μD,μH,σD,σH,u],u]/.{u->u2},"(∂/(∂u))LR+ curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","(∂/(∂u))LR+"},PlotLabel->Row[{"(∂/(∂u))LR+ curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[D[dnlr[x,μD,μH,σD,σH,u],u]/.{u->u1},"(∂/(∂u))LR- curve of 1st test"],Tooltip[D[dnlr[x,μD,μH,σD,σH,u],u]/.{u->u2},"(∂/(∂u))LR- curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","(∂/(∂u))LR-"},PlotLabel->Row[{"(∂/(∂u))LR- curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}]
],
vs==1,
Which[
plot==0,
Plot[{Tooltip[D[hppv[x,μD,μH,σD,σH,pd,u],u]/.{u->u1},"(∂/(∂u))PPV curve of 1st test"],Tooltip[D[hppv[x,μD,μH,σD,σH,pd,u],u]/.{u->u2},"(∂/(∂u))PPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","(∂/(∂u))PPV"},PlotLabel->Row[{"(∂/(∂u))PPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[D[hnpv[x,μD,μH,σD,σH,pd,u],u]/.{u->u1},"(∂/(∂u))NPV curve of 1st test"],Tooltip[D[hnpv[x,μD,μH,σD,σH,pd,u],u]/.{u->u2},"(∂/(∂u))NPV curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","(∂/(∂u))NPV"},PlotLabel->Row[{"(∂/(∂u))NPV curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[D[hor[x,μD,μH,σD,σH,u],u]/.{u->u1},"(∂/(∂u))OR curve of 1st test"],Tooltip[D[hor[x,μD,μH,σD,σH,u],u]/.{u->u2},"(∂/(∂u))OR curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","OR"},PlotLabel->Row[{"OR curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[D[hplr[x,μD,μH,σD,σH,u],u]/.{u->u1},"(∂/(∂u))LR+ curve of 1st test"],Tooltip[D[hplr[x,μD,μH,σD,σH,u],u]/.{u->u2},"(∂/(∂u))LR+ curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","(∂/(∂u))LR+"},PlotLabel->Row[{"(∂/(∂u))LR+ curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[D[hnlr[x,μD,μH,σD,σH,u],u]/.{u->u1},"(∂/(∂u))LR- curve of 1st test"],Tooltip[D[hnlr[x,μD,μH,σD,σH,u],u]/.{u->u2},"(∂/(∂u))LR- curve of 2nd test"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","(∂/(∂u))LR-"},PlotLabel->Row[{"(∂/(∂u))LR- curve"}],PlotStyle->{ColorData["HTML","SlateBlue"], RGBColor[1,.47,0]} ,Filling->Axis,ImageSize->{350,375}]
]
],
type==2,
Which[
vs==0,
Which[
plot==0,
Plot[{Tooltip[dppv[x,μD,μH,σD,σH,pd,u1]-dppv[x,μD,μH,σD,σH,pd,u2],"∆PPV curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","∆PPV"},PlotLabel->Row[{"∆PPV curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[dnpv[x,μD,μH,σD,σH,pd,u1]-dnpv[x,μD,μH,σD,σH,pd,u2],"∆NPV curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","∆NPV"},PlotLabel->Row[{"∆NPV curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[dor[x,μD,μH,σD,σH,u1]-dor[x,μD,μH,σD,σH,u2],"∆OR curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","∆OR"},PlotLabel->Row[{"∆OR curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{375,375}],
plot==3,
Plot[{Tooltip[dplr[x,μD,μH,σD,σH,u1]-dplr[x,μD,μH,σD,σH,u2],"∆LR+ curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","∆LR+"},PlotLabel->Row[{"∆LR+ curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[dnlr[x,μD,μH,σD,σH,u1]-dnlr[x,μD,μH,σD,σH,u2],"∆LR- curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","∆LR-"},PlotLabel->Row[{"∆LR- curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}]
],
vs==1,
Which[
plot==0,
Plot[{Tooltip[hppv[x,μD,μH,σD,σH,pd,u1]-hppv[x,μD,μH,σD,σH,pd,u2],"∆PPV curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","∆PPV"},PlotLabel->Row[{"∆PPV curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[hnpv[x,μD,μH,σD,σH,pd,u1]-hnpv[x,μD,μH,σD,σH,pd,u2],"∆NPV curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","∆NPV"},PlotLabel->Row[{"∆NPV curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[hor[x,μD,μH,σD,σH,u1]-hor[x,μD,μH,σD,σH,u2],"∆OR curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","∆OR"},PlotLabel->Row[{"∆OR curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[hplr[x,μD,μH,σD,σH,u1]-hplr[x,μD,μH,σD,σH,u2],"∆LR+ curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","∆LR+"},PlotLabel->Row[{"∆LR+ curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[hnlr[x,μD,μH,σD,σH,u1]-hnlr[x,μD,μH,σD,σH,u2],"∆LR- curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","∆LR-"},PlotLabel->Row[{"∆LR- curve"}],PlotStyle->{ColorData["HTML","Gray"]} ,Filling->Axis,FillingStyle->LightGray,ImageSize->{350,375}]
]
],
type==3,
Which[
vs==0,
Which[
plot==0,
Plot[{Tooltip[dppv[x,μD,μH,σD,σH,pd,u1]/dppv[x,μD,μH,σD,σH,pd,u2],"∆PPV curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","PPV ratio"},PlotLabel->Row[{"PPV ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[dnpv[x,μD,μH,σD,σH,pd,u1]/dnpv[x,μD,μH,σD,σH,pd,u2],"∆NPV curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","NPV ratio"},PlotLabel->Row[{"NPV ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[dor[x,μD,μH,σD,σH,u1]/dor[x,μD,μH,σD,σH,u2],"∆OR curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","OR ratio"},PlotLabel->Row[{"OR ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[dplr[x,μD,μH,σD,σH,u1]/dplr[x,μD,μH,σD,σH,u2],"LR+ ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","LR+ ratio"},PlotLabel->Row[{"LR+ ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[dnlr[x,μD,μH,σD,σH,u1]/dnlr[x,μD,μH,σD,σH,u2],"LR- ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"sensitivity","LR- ratio"},PlotLabel->Row[{"LR- ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}]
],
vs==1,
Which[
plot==0,
Plot[{Tooltip[hppv[x,μD,μH,σD,σH,pd,u1]/hppv[x,μD,μH,σD,σH,pd,u2],"PPV ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","PPV ratio"},PlotLabel->Row[{"PPV ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==1,
Plot[{Tooltip[hnpv[x,μD,μH,σD,σH,pd,u1]/hnpv[x,μD,μH,σD,σH,pd,u2],"NPV ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","NPV ratio"},PlotLabel->Row[{"NPV ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==2,
Plot[{Tooltip[hor[x,μD,μH,σD,σH,u1]/hor[x,μD,μH,σD,σH,u2],"OR ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","OR ratio"},PlotLabel->Row[{"OR ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==3,
Plot[{Tooltip[hplr[x,μD,μH,σD,σH,u1]/hplr[x,μD,μH,σD,σH,u2],"LR+ ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","LR+ ratio"},PlotLabel->Row[{"LR+ ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}],
plot==4,
Plot[{Tooltip[hnlr[x,μD,μH,σD,σH,u1]/hnlr[x,μD,μH,σD,σH,u2],"LR- ratio curve"]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"specificity","LR- ratio"},PlotLabel->Row[{"LR- ratio curve"}],PlotStyle->{ColorData["HTML","Brown"]} ,Filling->Axis,FillingStyle->LightBrown,ImageSize->{350,375}]
]
]
],
{{type,0,"type"},{0->"measures",1->"derivatives",2->"difference", 3->"ratio"},ControlPlacement->Top},
{{plot,0,"plot"},{0->"PPV",1->"NPV",2->"OR",3->"LR+",4-> "LR-"},ControlPlacement->Top},
{{vs,0,"versus"},{0->"sensitivity",1->"specificity"},ControlPlacement->Top},
Style["prevalence of disease",Bold],
{{pd,0.05,"prevalence"},0.00000001,.99,ImageSize->Tiny,Appearance->"Labeled"},
Style["nondiseased population",Bold],
{{μH,0,"mean"},0,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
{{σH,1,"standard deviation"},0.01,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
Style["diseased population",Bold],
{{μD,3.67,"mean"},0,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
{{σD,1,"standard deviation"},0.01,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
Style["uncertainty of measurement",Bold],
{{u1,0.15,"first test"},0,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
{{u2,0.45,"second test"},0,6,.01,ImageSize->Tiny,Appearance->"Labeled"},SaveDefinitions->True,AutorunSequencing->{1,2,6},TrackedSymbols->True,ControlPlacement->Left]

Description

This Demonstration compares various diagnostic accuracy measures of two diagnostic tests. The two tests measure the same measurand, for normally distributed nondiseased and diseased populations, for various values of the prevalence of the disease, of the mean and standard deviation of the populations, and of the uncertainty of measurement of the tests. A normal distribution of the uncertainty is assumed. The mean and the standard deviation of each population and the uncertainty of each test are measured in arbitrary units. The measures compared are the positive predictive value (PPV), the negative predictive value (NPV), the (diagnostic) odds ratio (OR), the likelihood ratio for a positive result (LR+), and the likelihood ratio for a negative result (LR-). The measures are calculated versus the sensitivity or the specificity of each test. That can be selected by clicking the respective button. The types of plot are: both measures (first test: blue plot, second test: orange plot), partial derivatives of both measures with respect to uncertainty (first test: blue plot, second test: orange plot), difference, and ratio of the two measures.

Snapshots

Details

In addition to the receiver operating characteristic (ROC) curves, various measures are used in the evaluation of the clinical accuracy of a diagnostic test applied to a diseased or a nondiseased population. They can be calculated versus the sensitivity or the specificity of the test. Sensitivity is the fraction of the diseased population with a positive test, while specificity is the fraction of the nondiseased population with a negative test. In addition, if we denote by sens the sensitivity, spec the specificity, and pr the prevalence, we have: 
PPV=((sens×pr)/(sens×pr+(1-spec)(1-pr))), NPV=((spec(1-pr))/(spec(1-pr)+(1-sens)pr)), OR=((sens/(1-sens))/((1-spec)/spec)), LR+ =(sens/(1-spec)), LR- =((1-sens)/spec).
This Demonstration could be useful in evaluating the maximum medically permissible uncertainty of measurement of a diagnostic test. For example, in the thumbnail and the snapshots the populations data describes a bimodal distribution of serum glucose measurements with a nondiabetic and a diabetic population (Lim et al. 2002). The first test has a state-of-the-art performance, while the second test has a greater uncertainty.

References

T. O. Lim, R. Bakri, Z. Morad, and M. A. Hamid, "Bimodality in Blood Glucose Distribution: Is It Universal?," Diabetes Care, 25(12), 2002 pp. 2212–2217.

Keywords

uncertainty of measurement
sensitivity
specificity
diagnostic test
clinical accuracy
diagnostic accuracy
permissible uncertainty
normal distribution
binormal distribution
positive predictive value
negative predictive value
likelihood ratio
odds ratio

Disclaimer of Warranties

The notebook is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or Hellenic Complex Systems Laboratory or any of its members be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the notebook or the use or other dealings in the notebook.

About

Uncertainty of Measurement and Diagnostic Accuracy Measures
Version Number 1.1.0
Hellenic Complex Systems Laboratory 2021
First published at Wolfram Demonstrations Project at: (HyperlinkURL["demonstrations.wolfram.com/UncertaintyOfMeasurementAndDiagnosticAccuracyMeasures/", https://demonstrations.wolfram.com/UncertaintyOfMeasurementAndDiagnosticAccuracyMeasures/])
The notebook is distributed under  an Attribution - NonCommercial - ShareAlike 4.0 International Creative Commons License.