Bayesian Diagnosis

A Bayesian inference based computational tool for parametric and nonparametric medical diagnosis

Theodora Chatzimichail, MD  
tc@hcsl.com
Aristides T. Hatjimihail, MD, PhD
 ath@hcsl.com

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

Datasets

Clear["`*"];
(*The provided datasets, d1 (Fasting Plasma Glucose (mg/dl) in diabetics 40-60 years old), d2 (Glucated Hemoglobin A1c(%) in diabetics 40-60 years old), nd1 (Fasting Plasma Glucose (mg/dl) in nondiabetics 40-60 years old) and nd2 Glucated Hemoglobin A1c(%) in nondiabetics 40-60 years old), were obtained from the database of the National Health and Nutrition Examination Survey (NHANES), Centers for Disease Control and Prevention, USA. They can be replaced by other datasets of two mesurands in diseased and nondiseased*) 
(*d1: 1st measurand in diseased. Current dataset: Fasting Plasma Glucose (mg/dl) in diabetics 40-60 years old*)
d1={121.`,117.`,140.`,161.`,131.`,163.`,200.`,114.`,103.`,249.`,85.`,282.`,104.`,138.`,117.`,123.`,234.`,111.`,128.`,107.`,120.`,96.`,121.`,121.`,141.`,123.`,140.`,106.`,102.`,143.`,94.`,148.`,166.`,121.`,120.`,171.`,124.`,117.`,149.`,122.`,104.`,115.`,147.`,87.`,100.`,118.`,145.`,128.`,181.`,100.`,141.`,95.`,172.`,97.`,117.`,212.`,99.`,92.`,100.`,106.`,104.`,101.`,115.`,120.`,118.`,136.`,114.`,115.`,111.`,124.`,106.`,163.`,104.`,106.`,97.`,108.`,115.`,357.`,108.`,103.`,126.`,180.`,179.`,134.`,198.`,114.`,129.`,83.`,245.`,343.`,124.`,158.`,129.`,118.`,130.`,137.`,112.`,120.`,211.`,102.`,120.`,128.`,258.`,128.`,124.`,104.`,120.`,109.`,137.`,101.`,165.`,128.`,143.`,135.`,143.`,113.`,141.`,335.`,130.`,223.`,132.`,114.`,138.`,118.`,119.`,108.`,96.`,114.`,125.`,136.`,173.`,132.`,144.`,204.`,105.`,146.`,144.`,142.`,293.`,93.`,130.`,132.`,142.`,124.`,117.`,109.`,159.`,118.`,106.`,156.`,102.`,127.`,113.`,120.`,134.`,95.`,116.`,127.`,275.`,150.`,117.`,120.`,105.`,183.`,127.`,117.`,105.`,179.`,220.`,77.`,155.`,127.`,333.`,397.`,134.`,112.`,165.`,105.`,116.`,274.`,155.`,105.`,104.`,111.`,105.`,127.`,146.`,226.`,153.`,355.`,207.`,90.`,116.`,94.`,285.`,245.`,117.`,129.`,173.`,114.`,108.`,127.`,150.`,140.`,131.`,118.`,121.`,112.`,150.`,125.`,158.`};
(* d2: 2nd measurand in diseased. Current dataset: Glycated Hemoglobin A1c (%) in diabetics 40-60 years old *)
d2={6.`,5.4`,6.`,6.7`,5.5`,6.2`,9.6`,5.7`,5.4`,8.9`,4.8`,10.6`,5.4`,6.5`,5.`,5.7`,9.7`,5.7`,6.3`,5.7`,6.1`,5.7`,6.4`,6.`,6.4`,6.3`,6.9`,5.7`,5.`,6.3`,5.5`,6.6`,6.3`,5.9`,6.8`,6.9`,6.1`,5.7`,7.2`,6.4`,5.5`,5.5`,6.8`,5.4`,5.3`,6.`,6.6`,5.9`,8.9`,5.5`,6.6`,5.6`,6.4`,5.5`,5.5`,10.2`,5.5`,5.7`,5.5`,5.4`,6.1`,5.8`,5.9`,6.1`,6.5`,7.7`,6.5`,6.2`,5.`,6.3`,5.6`,8.4`,5.5`,5.7`,5.5`,6.8`,5.8`,13.6`,5.8`,6.3`,7.6`,8.5`,9.1`,6.2`,8.2`,5.8`,6.3`,5.2`,8.8`,8.8`,5.9`,5.`,6.1`,6.`,5.`,5.8`,5.8`,6.6`,8.7`,5.7`,5.4`,6.9`,11.1`,7.1`,5.6`,6.9`,6.7`,5.9`,5.5`,4.4`,7.1`,6.6`,7.7`,6.3`,6.3`,5.7`,6.8`,10.6`,7.5`,10.8`,6.3`,6.3`,6.1`,6.3`,5.9`,5.8`,6.`,6.5`,5.9`,6.2`,7.6`,6.4`,7.9`,9.3`,6.2`,6.4`,6.`,6.5`,12.7`,5.2`,6.3`,6.`,5.8`,7.`,5.3`,5.9`,6.9`,6.4`,5.`,7.`,5.6`,6.`,6.4`,6.5`,6.7`,5.6`,6.6`,6.`,10.9`,7.6`,6.2`,6.`,5.3`,7.2`,6.4`,5.6`,6.2`,7.5`,8.2`,5.6`,6.5`,6.6`,12.4`,13.7`,6.8`,6.4`,6.8`,5.6`,6.`,9.3`,7.1`,6.3`,5.8`,6.1`,6.4`,6.7`,6.6`,9.2`,6.8`,12.3`,7.7`,5.3`,6.2`,5.1`,10.2`,9.2`,7.`,6.4`,6.7`,6.`,5.9`,6.1`,7.4`,6.3`,5.9`,5.5`,6.1`,6.6`,6.5`,6.1`,7.1`};
(* nd1: 1st measurand in nondiseased. Current dataset: Fasting Plasma Glucose (mg/dl)in nondiabetics 40-60 years old*)
nd1={90.`,94.`,111.`,126.`,93.`,99.`,93.`,93.`,98.`,100.`,109.`,100.`,101.`,96.`,99.`,100.`,97.`,94.`,93.`,96.`,95.`,115.`,94.`,95.`,98.`,113.`,105.`,116.`,104.`,87.`,120.`,115.`,94.`,103.`,116.`,88.`,91.`,109.`,100.`,98.`,85.`,89.`,98.`,92.`,89.`,89.`,81.`,89.`,106.`,86.`,99.`,111.`,104.`,113.`,99.`,95.`,92.`,102.`,87.`,103.`,107.`,90.`,89.`,98.`,89.`,102.`,100.`,87.`,104.`,114.`,99.`,115.`,109.`,94.`,110.`,78.`,96.`,91.`,103.`,88.`,114.`,105.`,93.`,103.`,117.`,96.`,79.`,103.`,99.`,101.`,97.`,113.`,93.`,120.`,98.`,106.`,89.`,106.`,96.`,91.`,99.`,91.`,97.`,109.`,100.`,100.`,94.`,98.`,102.`,92.`,84.`,102.`,87.`,115.`,95.`,86.`,87.`,85.`,100.`,107.`,93.`,92.`,95.`,87.`,96.`,95.`,105.`,105.`,99.`,105.`,85.`,109.`,99.`,90.`,102.`,103.`,89.`,81.`,95.`,104.`,89.`,85.`,108.`,97.`,106.`,89.`,103.`,100.`,104.`,96.`,90.`,95.`,101.`,82.`,106.`,96.`,83.`,94.`,108.`,104.`,100.`,105.`,100.`,115.`,99.`,98.`,102.`,99.`,90.`,99.`,107.`,93.`,90.`,100.`,98.`,91.`,98.`,123.`,103.`,92.`,105.`,115.`,117.`,88.`,91.`,103.`,91.`,112.`,103.`,103.`,93.`,99.`,85.`,97.`,97.`,91.`,106.`,82.`,93.`,104.`,115.`,81.`,102.`,99.`,95.`,111.`,99.`,112.`,94.`,79.`,97.`,102.`,111.`,118.`,107.`,83.`,104.`,92.`,96.`,114.`,107.`,105.`,97.`,135.`,109.`,102.`,103.`,92.`,109.`,96.`,89.`,88.`,103.`,84.`,130.`,108.`,105.`,117.`,116.`,95.`,85.`,96.`,80.`,104.`,99.`,103.`,101.`,97.`,98.`,97.`,100.`,90.`,82.`,101.`,93.`,105.`,105.`,108.`,103.`,92.`,106.`,100.`,97.`,84.`,125.`,111.`,95.`,103.`,91.`,95.`,99.`,88.`,99.`,100.`,68.`,91.`,107.`,95.`,106.`,106.`,96.`,95.`,97.`,80.`,112.`,107.`,98.`,119.`,89.`,118.`,119.`,125.`,95.`,93.`,91.`,99.`,111.`,103.`,93.`,106.`,86.`,84.`,90.`,102.`,100.`,98.`,97.`,101.`,101.`,99.`,97.`,113.`,106.`,93.`,97.`,100.`,105.`,115.`,92.`,94.`,100.`,102.`,94.`,101.`,107.`,106.`,116.`,97.`,83.`,95.`,98.`,108.`,104.`,95.`,107.`,102.`,95.`,100.`,108.`,93.`,87.`,106.`,83.`,101.`,105.`,94.`,105.`,91.`,93.`,107.`,92.`,109.`,103.`,106.`,105.`,74.`,80.`,90.`,112.`,112.`,107.`,112.`,96.`,101.`,99.`,104.`,110.`,99.`,92.`,104.`,85.`,99.`,102.`,95.`,101.`,87.`,113.`,97.`,91.`,97.`,94.`,91.`,113.`,107.`,97.`,81.`,91.`,82.`,88.`,100.`,98.`,106.`,96.`,78.`,93.`,99.`,90.`,99.`,105.`,98.`,111.`,104.`,124.`,104.`,91.`,100.`,104.`,93.`,97.`,87.`,99.`,95.`,81.`,84.`,95.`,103.`,92.`,93.`,96.`,72.`,103.`,117.`,108.`,97.`,83.`,87.`,94.`,93.`,91.`,99.`,102.`,119.`,88.`,97.`,92.`,108.`,102.`,91.`,93.`,119.`,95.`,103.`,78.`,95.`,114.`,100.`,89.`,88.`,101.`,90.`,98.`,101.`,94.`,95.`,95.`,96.`,109.`,101.`,93.`,100.`,108.`,102.`,82.`,96.`,89.`,103.`,89.`,95.`,105.`,113.`,90.`,97.`,91.`,109.`,94.`,95.`,97.`,97.`,94.`,94.`,95.`,92.`,86.`,102.`,96.`,107.`,88.`,104.`,104.`,89.`,95.`,97.`,105.`,112.`,109.`,97.`,115.`,113.`,99.`,93.`,97.`,94.`,97.`,108.`,91.`,95.`,103.`,97.`,114.`,105.`,106.`,117.`,104.`,90.`,123.`,91.`,87.`,94.`,104.`,123.`,97.`,106.`,95.`,92.`,89.`,101.`,113.`,96.`,99.`,112.`,94.`,115.`,95.`,110.`,102.`,100.`,127.`,90.`,96.`,99.`,95.`,99.`,83.`,86.`,88.`,94.`,91.`,122.`,116.`,89.`,94.`,98.`,93.`,97.`,90.`,103.`,90.`,107.`,96.`,100.`,108.`,101.`,107.`,90.`,112.`,102.`,84.`,84.`,93.`,102.`,101.`,101.`,115.`,120.`,97.`,96.`,112.`,101.`,103.`,97.`,95.`,87.`,83.`,97.`,99.`,98.`,103.`,104.`,102.`,102.`,106.`,120.`,104.`,94.`,96.`,108.`,102.`,97.`,104.`,79.`,102.`,94.`,121.`,99.`,99.`,107.`,111.`,94.`,107.`,116.`,105.`,111.`,93.`,111.`,95.`,103.`,92.`,96.`,108.`,103.`,92.`,113.`,92.`,106.`,116.`,86.`,89.`,109.`,115.`,100.`,100.`,97.`,105.`,99.`,93.`,104.`,116.`,103.`,100.`,100.`,101.`,99.`,98.`,80.`,85.`,100.`,120.`,112.`,110.`,106.`,98.`,126.`,126.`,92.`,86.`,91.`,95.`,89.`,104.`,110.`,88.`,100.`,93.`,109.`,100.`,105.`,111.`,100.`,96.`,118.`,103.`,103.`,93.`,97.`,102.`,96.`,97.`,96.`,97.`,81.`,111.`,85.`,112.`,96.`,97.`,102.`,98.`,103.`,102.`,90.`,96.`,97.`,113.`,85.`,103.`,94.`,111.`,98.`,90.`,103.`,97.`,104.`,103.`,113.`,96.`,88.`,98.`,90.`,104.`,114.`,93.`,103.`,115.`,107.`,103.`,95.`,95.`,88.`,88.`,95.`,89.`,110.`,128.`,90.`,103.`,100.`,112.`,99.`,105.`,95.`,92.`,102.`,104.`,91.`,89.`,99.`,101.`,103.`,92.`,103.`,102.`,95.`,108.`,84.`,102.`,104.`,129.`,99.`,89.`,90.`,96.`,99.`,127.`,95.`,100.`,96.`,95.`,98.`,89.`,97.`,96.`,95.`,98.`,97.`,102.`,83.`,104.`,102.`,89.`,106.`,84.`,103.`,86.`,96.`,119.`,115.`,98.`,94.`,106.`,114.`,87.`,93.`,96.`,90.`,102.`,101.`,84.`,113.`,89.`,112.`,94.`,102.`,102.`,100.`,114.`,86.`,115.`,112.`,101.`,95.`,106.`,116.`,99.`,115.`,105.`,106.`,110.`,105.`,75.`,110.`,87.`,81.`,119.`,128.`,88.`,120.`,124.`,107.`,116.`,104.`,106.`,100.`,99.`,89.`,95.`,107.`,87.`,89.`,110.`,106.`,102.`,122.`,97.`,97.`,93.`,105.`,110.`,96.`,83.`,98.`,115.`,108.`,115.`,96.`,107.`,118.`,116.`,107.`,100.`,96.`,122.`,101.`,101.`,97.`,88.`,104.`,86.`,109.`,95.`,106.`,115.`,90.`,102.`,107.`,111.`,82.`,102.`,99.`,103.`,95.`,111.`,117.`,99.`,81.`,125.`,91.`,93.`,97.`,99.`,105.`,83.`,118.`,88.`,114.`,103.`,110.`,105.`,92.`,92.`,101.`,93.`,102.`,91.`,85.`,112.`,109.`,106.`,102.`,97.`,120.`,118.`,91.`,95.`,112.`,101.`,106.`,98.`,99.`,88.`,106.`,107.`,99.`,111.`,116.`,90.`,91.`,94.`,94.`,105.`,105.`,89.`,98.`,95.`,81.`,90.`,97.`,122.`,113.`,109.`,106.`,130.`,97.`,92.`,108.`,95.`,98.`,101.`,98.`,101.`,112.`,105.`,98.`,108.`,93.`,91.`,103.`,100.`,105.`,102.`,89.`,98.`,91.`,91.`,110.`,94.`,104.`,92.`,90.`,90.`,104.`,97.`,101.`,112.`,108.`,102.`,100.`,119.`,104.`,101.`,87.`,96.`,102.`,104.`,100.`,104.`,112.`,107.`,106.`,84.`,106.`,102.`,94.`,93.`,104.`,99.`,97.`,99.`,101.`,83.`,105.`,99.`,87.`,108.`,90.`,95.`,77.`,102.`,94.`,111.`,99.`,106.`,93.`,109.`,114.`,99.`,109.`,93.`,107.`,92.`,110.`,92.`,108.`,91.`,89.`,102.`,119.`,94.`,88.`,109.`,108.`,106.`,98.`,103.`,99.`,102.`,102.`,99.`,81.`,95.`,105.`,111.`,98.`,99.`,105.`,100.`,99.`,97.`,93.`,104.`,106.`,91.`,112.`,88.`,103.`,92.`,99.`,101.`,88.`,108.`,80.`,95.`,107.`,98.`,101.`,94.`,98.`,105.`,92.`,112.`,108.`,110.`,119.`,101.`,94.`,97.`,101.`,97.`,104.`,100.`,105.`,104.`,113.`,104.`,96.`,119.`,84.`,116.`,99.`,89.`,99.`,96.`,105.`,114.`,104.`,100.`,98.`,108.`,99.`,94.`,83.`,90.`,137.`,102.`,96.`,94.`,106.`,98.`,101.`,125.`,100.`,103.`,92.`,93.`,117.`,97.`,111.`,95.`,114.`,99.`,97.`,93.`,99.`,124.`,110.`,99.`,100.`,98.`,97.`,134.`,95.`,89.`,108.`,100.`,98.`,97.`,93.`,95.`,105.`,90.`,96.`,92.`,90.`,98.`,88.`,92.`,90.`,117.`,75.`,96.`,92.`,90.`,99.`,101.`,96.`,100.`,93.`,86.`,91.`,88.`,99.`,93.`,101.`,94.`,100.`,91.`,104.`,92.`,111.`,97.`,101.`,107.`,86.`,81.`,91.`,103.`,92.`,105.`,108.`,83.`,103.`,126.`,91.`,101.`,97.`,79.`,96.`,115.`,106.`,101.`,106.`,119.`,96.`,94.`,85.`,96.`,113.`,98.`,98.`,108.`,96.`,96.`,109.`,109.`,92.`,101.`,107.`,90.`,89.`,83.`,100.`,120.`,106.`,89.`,111.`,85.`,136.`,99.`,115.`,99.`,97.`,90.`,93.`,99.`,100.`,113.`,98.`,95.`,98.`,87.`,91.`,91.`,95.`,106.`,88.`,108.`,97.`,98.`,110.`,89.`,102.`,94.`,119.`,99.`,92.`,98.`,99.`,101.`,104.`,97.`,94.`,93.`,106.`,94.`,101.`,114.`,98.`,101.`,104.`,85.`,87.`,88.`,94.`,100.`,110.`,90.`,91.`,103.`,111.`,110.`,113.`,107.`,93.`,93.`,120.`,89.`,98.`,97.`,95.`,88.`,94.`,91.`,86.`,109.`,105.`,91.`,103.`,89.`,100.`,103.`,90.`,115.`,102.`,96.`,85.`,99.`,111.`,100.`,105.`,96.`,98.`,96.`,89.`,88.`,93.`,102.`,100.`,99.`,99.`,96.`,89.`,103.`,100.`,82.`,95.`,97.`,97.`,161.`,116.`,99.`,93.`,112.`,97.`,91.`,99.`,94.`,115.`,105.`,93.`,106.`,102.`,100.`,102.`,105.`,111.`,95.`,111.`,92.`,92.`,104.`,96.`,118.`,106.`,83.`,92.`,113.`,87.`,99.`,89.`,104.`,109.`,91.`,89.`,88.`,86.`,94.`,100.`,110.`,101.`,97.`,90.`,100.`,90.`,89.`,113.`,98.`,100.`,105.`,115.`,104.`,99.`,93.`,134.`,105.`,86.`,107.`,92.`,87.`,96.`,105.`,105.`,109.`,90.`,112.`,98.`,112.`,83.`,85.`,108.`,101.`,95.`,99.`,107.`,97.`,101.`,103.`,96.`,94.`,91.`,99.`,90.`,114.`,96.`,102.`,90.`,101.`,100.`,138.`,86.`,111.`,99.`,87.`,100.`,100.`,104.`,100.`,112.`,106.`,92.`,99.`,90.`,99.`,86.`,104.`,98.`,105.`,98.`,78.`,90.`,88.`,107.`,98.`,112.`,122.`,81.`,91.`,88.`,92.`,94.`,107.`,127.`,89.`,110.`,86.`,106.`,83.`,96.`,102.`,77.`,91.`,97.`,99.`,102.`,84.`,89.`,101.`,103.`,93.`,89.`,103.`,99.`,101.`,109.`,110.`,105.`,102.`,108.`,109.`,98.`,96.`,105.`,84.`,100.`,108.`,104.`,88.`,92.`,104.`,102.`,107.`,111.`,85.`,111.`,97.`,96.`,118.`,87.`,81.`,86.`,102.`,91.`,100.`,103.`,91.`,106.`,102.`,107.`,108.`,96.`,96.`,103.`,90.`,101.`,106.`,101.`,95.`,81.`,87.`,94.`,92.`,89.`,100.`,94.`,82.`,94.`,120.`,85.`,89.`,105.`,93.`,134.`,86.`,96.`,100.`,99.`,93.`,103.`,94.`,96.`,105.`,86.`,98.`,96.`,97.`,98.`,97.`,100.`,99.`,90.`,81.`,116.`,88.`,104.`,98.`,110.`,110.`,115.`,94.`,110.`,93.`,91.`,96.`,95.`,87.`,87.`,95.`,118.`,91.`,95.`,94.`,97.`,103.`,103.`,94.`,107.`,98.`,97.`,106.`,84.`,104.`,102.`,92.`,117.`,99.`,112.`,111.`,111.`,104.`,111.`,125.`,92.`,101.`,109.`,108.`,89.`,118.`,121.`,119.`,93.`,102.`,102.`,109.`,89.`,84.`,96.`,95.`,101.`,91.`,90.`,101.`,106.`,106.`,103.`,91.`,90.`,98.`,88.`,103.`,122.`,95.`,76.`,107.`,116.`,103.`,98.`,102.`,94.`,95.`,113.`,107.`,79.`,101.`,107.`,99.`,97.`,106.`,87.`,96.`,111.`,90.`,93.`,118.`,100.`,92.`,92.`,86.`,95.`,91.`,99.`,109.`,107.`,130.`,103.`,105.`,79.`,100.`,109.`,105.`,86.`,95.`,101.`,119.`,105.`,108.`,90.`,95.`,99.`,110.`,82.`,109.`,91.`,105.`,79.`,105.`,83.`,111.`,99.`,105.`,104.`,102.`,105.`,87.`,107.`,101.`,105.`,96.`,99.`,88.`,101.`,99.`,82.`,98.`,90.`,105.`,103.`,114.`,101.`,94.`,138.`,102.`,101.`,83.`,96.`,104.`,105.`,133.`,99.`,102.`,105.`,97.`,105.`,95.`,81.`,94.`,116.`,99.`,106.`,114.`,95.`,100.`,100.`,96.`,98.`,94.`,105.`,78.`,101.`,79.`,91.`,88.`,100.`,102.`,112.`,97.`,93.`,96.`,109.`,100.`,104.`,105.`,97.`,92.`,83.`,95.`,106.`,100.`,97.`,89.`,137.`,107.`,108.`,98.`,106.`,100.`,99.`,110.`,103.`,117.`,103.`,101.`,104.`,92.`,95.`,106.`,105.`,127.`,110.`,105.`,97.`,95.`,88.`,97.`,88.`,98.`,109.`,109.`,100.`,101.`,111.`,92.`,90.`,101.`,93.`,91.`,114.`,109.`,115.`,96.`,116.`,107.`,98.`,98.`,96.`,114.`,89.`,84.`,116.`,99.`,106.`,106.`,81.`,115.`,86.`,100.`,108.`,84.`,97.`,93.`,92.`,92.`,88.`,124.`,93.`,84.`,107.`,91.`,99.`,99.`,99.`,93.`,88.`,84.`,92.`,104.`,97.`,99.`,117.`,91.`,94.`,84.`,105.`,96.`,92.`,100.`,92.`,102.`,140.`,98.`,82.`,103.`,98.`,102.`,93.`,95.`,90.`,110.`,92.`,93.`,95.`,107.`,89.`,102.`,104.`,111.`,105.`,99.`,113.`,88.`,104.`,100.`,97.`,106.`,109.`,97.`,110.`,91.`,96.`,113.`,86.`,100.`,82.`,104.`,95.`,99.`,103.`,89.`,107.`,103.`,107.`,96.`,81.`,99.`,98.`,110.`,106.`,97.`,95.`,85.`,103.`,91.`,100.`,107.`,98.`,97.`,87.`,96.`,98.`,101.`,97.`,109.`,98.`,86.`,102.`,105.`,107.`,99.`,99.`,92.`,112.`,107.`,103.`,88.`,83.`,104.`,90.`,110.`,107.`,107.`,91.`,95.`,96.`,102.`,93.`,96.`,96.`,107.`,96.`,113.`,124.`,105.`,93.`,131.`,116.`,96.`,88.`,86.`,111.`,89.`,101.`,91.`,101.`,90.`,85.`,102.`,111.`,85.`,104.`,89.`,96.`,116.`,94.`,100.`,96.`,104.`,87.`,107.`,103.`,103.`,108.`,97.`,94.`,97.`,90.`,96.`,108.`,92.`,92.`,103.`,87.`,96.`,95.`,91.`,90.`,98.`,149.`,89.`,80.`,84.`,94.`,103.`,105.`,101.`,108.`,103.`,109.`,88.`,100.`,109.`,92.`,101.`,91.`,102.`,96.`,111.`,102.`,86.`,103.`,101.`,91.`,95.`,93.`,86.`,112.`,95.`,110.`,93.`,108.`,93.`,97.`,93.`,96.`,99.`,124.`,90.`,91.`,102.`,108.`,100.`,85.`,114.`,91.`,111.`,86.`,87.`,88.`,103.`,93.`,102.`,110.`,118.`,126.`,90.`,98.`,82.`,89.`,114.`,86.`,97.`,90.`,96.`,94.`,108.`,103.`,93.`,84.`,94.`,94.`,101.`,100.`,98.`,105.`,90.`,84.`,102.`,103.`,97.`,106.`,88.`,93.`,116.`,105.`,111.`,111.`,107.`,92.`,99.`,144.`,90.`,117.`,87.`,89.`,90.`,95.`,75.`,98.`,107.`,91.`,93.`,115.`,89.`,98.`,93.`,119.`,100.`,92.`,99.`,95.`,115.`,86.`,88.`,121.`,93.`,107.`,86.`,87.`,91.`,102.`,102.`,102.`,123.`,114.`,102.`,95.`,99.`,92.`,94.`,131.`,90.`,105.`,78.`,91.`,97.`,90.`,101.`,107.`,103.`,95.`,105.`,109.`,103.`,93.`,106.`,99.`,96.`,95.`,94.`,99.`,89.`,108.`,95.`,96.`,103.`,108.`,119.`,96.`,87.`,86.`,79.`,93.`,95.`,93.`,103.`,92.`,103.`,101.`,73.`,100.`,98.`,88.`,77.`,105.`,98.`,94.`,97.`,99.`,102.`,83.`,95.`,88.`,98.`,97.`,91.`,109.`,114.`,88.`,70.`,99.`,103.`,93.`,93.`,107.`,93.`,91.`,111.`,95.`,100.`,99.`,93.`,85.`,105.`,91.`,109.`,92.`,91.`,103.`,92.`,107.`,91.`,87.`,89.`,111.`,111.`,108.`,89.`,100.`,102.`,98.`,99.`,101.`,91.`,91.`,99.`,113.`,105.`,96.`,90.`,90.`,116.`,81.`,91.`,103.`,90.`,108.`,79.`,85.`,108.`,85.`,108.`,107.`,110.`,115.`,94.`,94.`,103.`,93.`,109.`,103.`,98.`,98.`,105.`,120.`,98.`,94.`,103.`,81.`,96.`,99.`,101.`,117.`,107.`,89.`,113.`,100.`,85.`,92.`,88.`,116.`,95.`,113.`,93.`,103.`,108.`,88.`,100.`,91.`,101.`,108.`,115.`,114.`,93.`,95.`,92.`,113.`,113.`,92.`,93.`,115.`,91.`,110.`,98.`,87.`,87.`,116.`,97.`,100.`,104.`,112.`,103.`,89.`,92.`,115.`,102.`,105.`,99.`,108.`,95.`,105.`,98.`,128.`,77.`,116.`,107.`,93.`,98.`,91.`,100.`,97.`,104.`,103.`,89.`,84.`,135.`,87.`,95.`,99.`,106.`,90.`,114.`,96.`,101.`,104.`,99.`,96.`,95.`,97.`,99.`,98.`,104.`,106.`,91.`,82.`,99.`,101.`,93.`,113.`,83.`,98.`,94.`,99.`,97.`,102.`,108.`,105.`,119.`,98.`,115.`,102.`,106.`,108.`,93.`,98.`,93.`,97.`,104.`,82.`,111.`,104.`,107.`,83.`,100.`,99.`,84.`,90.`,120.`,108.`,82.`,98.`,88.`,96.`,92.`,102.`,104.`,110.`,103.`,109.`,103.`,107.`,124.`,91.`,116.`,89.`,89.`,91.`,75.`,87.`,111.`,112.`,91.`,102.`,86.`,99.`,102.`,106.`,98.`,94.`,94.`,111.`,119.`,108.`,104.`,98.`,87.`,97.`,101.`,92.`,91.`,99.`,100.`,114.`,101.`,105.`,100.`,98.`,93.`,103.`,115.`,102.`,89.`,98.`,99.`,115.`,95.`,105.`,100.`,83.`,102.`,98.`,102.`,81.`,106.`,98.`,93.`,91.`,91.`,94.`,100.`,107.`,108.`,96.`,105.`,92.`,109.`,102.`,105.`,101.`,96.`,97.`,104.`,102.`,88.`,115.`,95.`,95.`,91.`,117.`,86.`,90.`,86.`,106.`,75.`,96.`,87.`,85.`,85.`,93.`,129.`,84.`,112.`,110.`,93.`,107.`,95.`,112.`,96.`,110.`,107.`,90.`,98.`,102.`,96.`,89.`,105.`,105.`,88.`,95.`,96.`,105.`,90.`,94.`,103.`,104.`,83.`,107.`,107.`,103.`,120.`,107.`,99.`,100.`,119.`,101.`,90.`,100.`,111.`,98.`,107.`,109.`,97.`,95.`,90.`,107.`,97.`,106.`,96.`,97.`,111.`,86.`,105.`,92.`,123.`,99.`,101.`,98.`,106.`,96.`,110.`,111.`,81.`,110.`,93.`,97.`,104.`,97.`,92.`,86.`,109.`,94.`,84.`,86.`,81.`,95.`,85.`,87.`,108.`,127.`,98.`,81.`,102.`,100.`,92.`,112.`,109.`,109.`,97.`,103.`,107.`,90.`,92.`,90.`,95.`,103.`,93.`,95.`,75.`,95.`,98.`,114.`,100.`,81.`,95.`,92.`,101.`,91.`,99.`,108.`,98.`,102.`,93.`,95.`,99.`,97.`,96.`,96.`,105.`,101.`,82.`,108.`,91.`,98.`,108.`,113.`,93.`,116.`,85.`,99.`,103.`,110.`,112.`,103.`,93.`,103.`,93.`,102.`,99.`,86.`,99.`,105.`,83.`,84.`,77.`,96.`,101.`,94.`,99.`,107.`,85.`,129.`,99.`,80.`,94.`,107.`,109.`,96.`,131.`,94.`,115.`,109.`,87.`,101.`,131.`,112.`,93.`,98.`,112.`,106.`,100.`,91.`,97.`,84.`,113.`,92.`,102.`,105.`,92.`,105.`,96.`,94.`,97.`,114.`,103.`,94.`,93.`,99.`,90.`,108.`,102.`,100.`,93.`,81.`,119.`,95.`,103.`,98.`,104.`,84.`,91.`,78.`,101.`,89.`,91.`,91.`,128.`,110.`,96.`,92.`,101.`,93.`,90.`,94.`,98.`,101.`,103.`,99.`,107.`,87.`,78.`,93.`,123.`,94.`,94.`,107.`,100.`,95.`,94.`,107.`,94.`,84.`,106.`,104.`,90.`,93.`,103.`,115.`,89.`,97.`,105.`,106.`,95.`,88.`,90.`,101.`,95.`,94.`,102.`,98.`,79.`,103.`,90.`,92.`,89.`,97.`,111.`,87.`,110.`,89.`,95.`,106.`,98.`,98.`,102.`,102.`,105.`,102.`,94.`,108.`,93.`,103.`,104.`,100.`,93.`,99.`,121.`,99.`,96.`,98.`,81.`,83.`,100.`,88.`,100.`,96.`,108.`,93.`,93.`,100.`,107.`,96.`,94.`,103.`,86.`,96.`,84.`,99.`,92.`,110.`,96.`,100.`,98.`,114.`,100.`,128.`,104.`,94.`,97.`,92.`,107.`,90.`,91.`,111.`,133.`,127.`,96.`,94.`,108.`,108.`,107.`,88.`,95.`,105.`,98.`,114.`,93.`,114.`,82.`,93.`,102.`,104.`,92.`,111.`,103.`,89.`,83.`,94.`,93.`,97.`,97.`,109.`,99.`,100.`,95.`,111.`,108.`,87.`,98.`,100.`,114.`,105.`,86.`,112.`,95.`,89.`,109.`,100.`,105.`,118.`,96.`,92.`,99.`,106.`,109.`,97.`,107.`,97.`,118.`,99.`,70.`,107.`,87.`,90.`,104.`,99.`,108.`,118.`,90.`,98.`,99.`,96.`,90.`,96.`,102.`,87.`,68.`,101.`,96.`,94.`,100.`,96.`,104.`,104.`,89.`,85.`,107.`,108.`,95.`,99.`,97.`,105.`,111.`,100.`,115.`,94.`,101.`,80.`,100.`,92.`,93.`,100.`,105.`,97.`,101.`,106.`,100.`,100.`,113.`,92.`,104.`,95.`,101.`,105.`,108.`,84.`,98.`,88.`,92.`,114.`,101.`,101.`,94.`,90.`,100.`,118.`,101.`,83.`,90.`,99.`,96.`,97.`,92.`,101.`,96.`,94.`,93.`,100.`,99.`,99.`,106.`,97.`,99.`,111.`,105.`,120.`,92.`,91.`,93.`,106.`,101.`,106.`,98.`,127.`,101.`,94.`,77.`,82.`,96.`,93.`,90.`,108.`,118.`,97.`,99.`,94.`,104.`,92.`,96.`,94.`,107.`,97.`,87.`,111.`,102.`,101.`,114.`,105.`,99.`,94.`,131.`,94.`,89.`,97.`,93.`,112.`,94.`,109.`,100.`,88.`,107.`,87.`,89.`,110.`,92.`,86.`,99.`,94.`,113.`,101.`,101.`,98.`,103.`,110.`,94.`,97.`,104.`,121.`,92.`,130.`,104.`,102.`,87.`,94.`,92.`,95.`,103.`,95.`,104.`,113.`,101.`,109.`,104.`,87.`,89.`,100.`,93.`,96.`,97.`,121.`,91.`,110.`,98.`,94.`,115.`,98.`,110.`,83.`,98.`,91.`,97.`,94.`,86.`,87.`,98.`,99.`,99.`,120.`,88.`,82.`,113.`,115.`,96.`,94.`,99.`,87.`,92.`,91.`,96.`,94.`,107.`,122.`,96.`,118.`,109.`,95.`,128.`,87.`,137.`,110.`,100.`,108.`,105.`,102.`,90.`,104.`,101.`,94.`,104.`,100.`,103.`,90.`,93.`,100.`,100.`,86.`,98.`,89.`,106.`,90.`,106.`,117.`,108.`,108.`,99.`,105.`,88.`,92.`,83.`,100.`,100.`,103.`,103.`,88.`,93.`,89.`,85.`,101.`,104.`,86.`,97.`,101.`,97.`,101.`,91.`,120.`,94.`,88.`,86.`,86.`,92.`,91.`,98.`,98.`,97.`,97.`,101.`,102.`,128.`,88.`,100.`,108.`,89.`,99.`,106.`,91.`,131.`,102.`,104.`,111.`,99.`,97.`,84.`,98.`,98.`,101.`,138.`,97.`,96.`,96.`,96.`,96.`,98.`,106.`,97.`,90.`,84.`,104.`,126.`,101.`,110.`,95.`,114.`,99.`,109.`,97.`,102.`,104.`,110.`,95.`,109.`,97.`,97.`,115.`,91.`,94.`,96.`,86.`,126.`,94.`,93.`,84.`,109.`,112.`,123.`,94.`,102.`,100.`,103.`,106.`,111.`,105.`,91.`,108.`,96.`,101.`,97.`,103.`,126.`,127.`,102.`,98.`,100.`,102.`,121.`,83.`,95.`,106.`,103.`,97.`,97.`,120.`,107.`,118.`,114.`,106.`,114.`,87.`,100.`,97.`,117.`,115.`,110.`,97.`,106.`,90.`,95.`,94.`,103.`,103.`,107.`,105.`,97.`,109.`,77.`,111.`,98.`,98.`,102.`,90.`,112.`,107.`,92.`,102.`,98.`,95.`,94.`,100.`,102.`,105.`,102.`,135.`,97.`,118.`,117.`,97.`,101.`,89.`,89.`,101.`,115.`,128.`,97.`,102.`,90.`,107.`,99.`,102.`,106.`,104.`,110.`,103.`,111.`,107.`,108.`,91.`,113.`,94.`,112.`,107.`,108.`,108.`,87.`,117.`,112.`,106.`,91.`,122.`,93.`,101.`,107.`,92.`,126.`,113.`,122.`,84.`,89.`,110.`,87.`,93.`,106.`,79.`,101.`,106.`,105.`,64.`,104.`,109.`,116.`,104.`,85.`,111.`,90.`,101.`,100.`,96.`,117.`,99.`,93.`,92.`,98.`,106.`,120.`,127.`,99.`,103.`,96.`,88.`,94.`,112.`,100.`,94.`,114.`,119.`,121.`,95.`,124.`,104.`,97.`,101.`,106.`,106.`,96.`,94.`,111.`,103.`,102.`,95.`,104.`,95.`,95.`,103.`,107.`,112.`,110.`,108.`,107.`,98.`,104.`,99.`,106.`,91.`,102.`,91.`,106.`,106.`,100.`,104.`,110.`,101.`,94.`,102.`,97.`,100.`,115.`,105.`,117.`,98.`,94.`,81.`,112.`,99.`,100.`,115.`,111.`,91.`,110.`,107.`,104.`,128.`,87.`,96.`,96.`,95.`,118.`,112.`,89.`,119.`,97.`,89.`,102.`,97.`,109.`,100.`,96.`,94.`,101.`,88.`,105.`,117.`,101.`,92.`,100.`,92.`,118.`,94.`,94.`,91.`,95.`,98.`,93.`,96.`,108.`,93.`,92.`,93.`,94.`,106.`,100.`,105.`,120.`,105.`,93.`,104.`,95.`,108.`,89.`,102.`,99.`,118.`,132.`,98.`,112.`,98.`,97.`,98.`,113.`,86.`,113.`,92.`,96.`,122.`,96.`,88.`,114.`,139.`,134.`,86.`,113.`,95.`,102.`,97.`,121.`,110.`,95.`,107.`,122.`,98.`,98.`,115.`,105.`,99.`,118.`,118.`,93.`,107.`,104.`,101.`,103.`,96.`,98.`,105.`,99.`,99.`,125.`,100.`,119.`,121.`,78.`,131.`,94.`,97.`,96.`,96.`,86.`,103.`,115.`,113.`,97.`,99.`,91.`,110.`,96.`,105.`,100.`,100.`,98.`,107.`,110.`,111.`,83.`,111.`,101.`,106.`,97.`,96.`,114.`,102.`,100.`,107.`,81.`,113.`,132.`,111.`,102.`,103.`,89.`,115.`,110.`,93.`,92.`,105.`,92.`,129.`,99.`,90.`,97.`,96.`,105.`,97.`,103.`,122.`,86.`,101.`,100.`,100.`,79.`,117.`,103.`,103.`,99.`,96.`,111.`,99.`,113.`,106.`,113.`,97.`,102.`,113.`,106.`,102.`,119.`,109.`,90.`,83.`,126.`,94.`,103.`,116.`,96.`,103.`,101.`,111.`,99.`,88.`,113.`,106.`,85.`,99.`,103.`,94.`,96.`,99.`,102.`,96.`,98.`,111.`,82.`,104.`,102.`,116.`,104.`,96.`,105.`,106.`,106.`,90.`,87.`,94.`,98.`,95.`,106.`,104.`,110.`,105.`,113.`,122.`,100.`,87.`,97.`,117.`,112.`,95.`,89.`,128.`,97.`,108.`,97.`,97.`,90.`,94.`,115.`,95.`,96.`,111.`,91.`,121.`,81.`,101.`,113.`,107.`,112.`,101.`,110.`,91.`,112.`,96.`,104.`,120.`,95.`,114.`,94.`,93.`,119.`,89.`,116.`,108.`,97.`,91.`,104.`,110.`,107.`,98.`,99.`,105.`,94.`,87.`,84.`,92.`,88.`,103.`,115.`,107.`,93.`,92.`,107.`,101.`,96.`,101.`,101.`,99.`,104.`,95.`,99.`,96.`,100.`,88.`,98.`,98.`,84.`,101.`,94.`,96.`,97.`,102.`,117.`,110.`,101.`,104.`,115.`,95.`,101.`,104.`,113.`,101.`,98.`,74.`,98.`};
(* nd2: 2nd measurand in nondiseased. Current dataset: Glycated Hemoglobin A1c (%) in nondiabetics 40-60 years old*)
nd2={6.`,4.6`,5.2`,6.`,5.6`,5.1`,5.4`,4.3`,5.9`,6.`,5.7`,5.5`,4.9`,5.6`,5.4`,5.3`,5.8`,5.7`,4.8`,5.2`,5.3`,6.`,5.3`,5.6`,5.4`,5.5`,6.3`,5.`,5.2`,5.5`,5.4`,5.3`,4.7`,4.7`,5.4`,5.5`,5.4`,5.3`,5.4`,5.9`,4.6`,5.4`,5.7`,5.4`,4.2`,5.5`,5.2`,5.`,5.`,5.4`,5.3`,5.2`,6.`,5.9`,5.9`,5.3`,5.6`,5.7`,5.1`,5.5`,4.9`,5.3`,5.6`,5.2`,5.1`,5.1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.6`,5.4`,5.8`,5.6`,4.5`,5.6`,5.4`,5.9`,4.8`,5.1`,5.5`,5.2`,5.2`,5.2`,5.5`,5.7`,5.`,5.6`,5.6`,4.8`,5.7`,5.9`,5.7`,6.1`,5.6`,5.7`,6.`,5.8`,5.5`,5.5`,6.`,4.9`,5.5`,5.4`,5.2`,5.8`,5.6`,5.2`,5.`};

Code

Off[General::stop];
$MaxPrecision = Infinity;
SetSystemOptions["CheckMachineUnderflow"->False];
d12=MapThread[{#1,#2}&,{d1,d2}];
nd12=MapThread[{#1,#2}&,{nd1,nd2}];
v=N[Length[d12]/(Length[d12]+Length[nd12])];
mid1=Min[d1];
mid2=Min[d2];
mind1=Min[nd1];
mind2=Min[nd2];
mad1=Max[d1];
mad2=Max[d2];
mand1=Max[nd1];
mand2=Max[nd2];
md1=Mean[d1];
md2=Mean[d2];
mnd1=Mean[nd1];
mnd2=Mean[nd2];
mdd1=Median[d1];
mdd2=Median[d2];
mdnd1=Median[nd1];
mdnd2=Median[nd2];
sdd1=StandardDeviation[d1];
sdd2=StandardDeviation[d2];
sdnd1=StandardDeviation[nd1];
sdnd2=StandardDeviation[nd2];
skd1=Skewness[d1];
skd2=Skewness[d2];
sknd1=Skewness[nd1];
sknd2=Skewness[nd2];
kud1=Kurtosis[d1];
kud2=Kurtosis[d2];
kund1=Kurtosis[nd1];
kund2=Kurtosis[nd2];
cod=Correlation[d12][[1,2]];
cond=Correlation[nd12][[1,2]];
su[sigma_,u1_,u2_]:=(Sqrt[(sigma^2)-(u1^2)+(u2^2)]);
ru[ro_,sigma1_,sigma2_,u11_,u12_,u21_,u22_]:=ro sigma1 sigma2/(su[sigma1,u11,u12]su[sigma2,u21,u22]);
m[l_]:=Mean[l];
s[l_]:=StandardDeviation[l];
c[l1_,l2_]:=Correlation[l1,l2];
logNormalDistribution[μ_,σ_]:=LogNormalDistribution[(1/2) (2 Log[μ]-Log[(((μ^2)+(σ^2))/(μ^2))]),(Sqrt[Log[(((μ^2)+(σ^2))/(μ^2))]])];
gammaDistribution[μ_,σ_]:=GammaDistribution[(μ^2)/(σ^2),(σ^2)/μ];
biNormalDistribution[μX_,σX_,μY_,σY_,ρ_]:=BinormalDistribution[{μX,μY},{σX,σY},ρ];
biLogNormalDistribution[μX_,σX_,μY_,σY_,ρ_]:=LogMultinormalDistribution[{(1/2) (2 Log[μX]-Log[((((μX)^2)+((σX)^2))/((μX)^2))]),(1/2) (2 Log[μY]-Log[((((μY)^2)+((σY)^2))/((μY)^2))])},{{Log[((((μX)^2)+((σX)^2))/((μX)^2))],(1/(σX σY))(-1+(E^(ρ (Sqrt[Log[1+(((σX)^2)/((μX)^2))] Log[1+(((σY)^2)/((μY)^2))]])))) μX μY (Sqrt[Log[((((μX)^2)+((σX)^2))/((μX)^2))]]) (Sqrt[Log[((((μY)^2)+((σY)^2))/((μY)^2))]])},{(1/(σX σY))(-1+(E^(ρ (Sqrt[Log[1+(((σX)^2)/((μX)^2))] Log[1+(((σY)^2)/((μY)^2))]])))) μX μY (Sqrt[Log[((((μX)^2)+((σX)^2))/((μX)^2))]]) (Sqrt[Log[((((μY)^2)+((σY)^2))/((μY)^2))]]),Log[((((μY)^2)+((σY)^2))/((μY)^2))]}}];
biGammaDistribution[μX_,σX_,μY_,σY_,ρ_]:=CopulaDistribution[{"Binormal",ρ},{GammaDistribution[((μX)^2)/((σX)^2),((σX)^2)/μX],GammaDistribution[((μY)^2)/((σY)^2),((σY)^2)/μY]}];
biVariateDistribution[μX_,σX_,μY_,σY_,ρ_,distX_,distY_]:=
Switch[distX,
"normal",
Switch[distY,"normal",BinormalDistribution[{μX,μY},{σX,σY},ρ],"lognormal",CopulaDistribution[{"Binormal",((ρ σY)/(μY (Sqrt[Log[1+(((σY)^2)/((μY)^2))]])))},{NormalDistribution[μX,σX],LogNormalDistribution[(1/2) (2 Log[μY]-Log[((((μY)^2)+((σY)^2))/((μY)^2))]),(Sqrt[Log[((((μY)^2)+((σY)^2))/((μY)^2))]])]}],"gamma",CopulaDistribution[{"Binormal",ρ},{NormalDistribution[μX,σX],GammaDistribution[((μY)^2)/((σY)^2),((σY)^2)/μY]}]],
"lognormal",Switch[distY,"normal",CopulaDistribution[{"Binormal",((ρ σX)/(μX (Sqrt[Log[1+(((σX)^2)/((μX)^2))]])))},{LogNormalDistribution[(1/2) (2 Log[μX]-Log[((((μX)^2)+((σX)^2))/((μX)^2))]),(Sqrt[Log[((((μX)^2)+((σX)^2))/((μX)^2))]])],NormalDistribution[μY,σY]}],"lognormal",biLogNormalDistribution[μX,σX,μY,σY,ρ],"gamma",CopulaDistribution[{"Binormal",((ρ σX)/(μX (Sqrt[Log[1+(((σX)^2)/((μX)^2))]])))},{LogNormalDistribution[(1/2) (2 Log[μX]-Log[((((μX)^2)+((σX)^2))/((μX)^2))]),(Sqrt[Log[((((μX)^2)+((σX)^2))/((μX)^2))]])],GammaDistribution[((μY)^2)/((σY)^2),((σY)^2)/μY]}]],
"gamma",
Switch[distY,"normal",CopulaDistribution[{"Binormal",ρ},{GammaDistribution[((μX)^2)/((σX)^2),((σX)^2)/μX],NormalDistribution[μY,σY]}],"lognormal",CopulaDistribution[{"Binormal",((ρ σY)/(μY (Sqrt[Log[1+(((σY)^2)/((μY)^2))]])))},{GammaDistribution[((μX)^2)/((σX)^2),((σX)^2)/μX],LogNormalDistribution[(1/2) (2 Log[μY]-Log[((((μY)^2)+((σY)^2))/((μY)^2))]),(Sqrt[Log[((((μY)^2)+((σY)^2))/((μY)^2))]])]}],"gamma",biGammaDistribution[μX,σX,μY,σY,ρ]]];
ll[d_,dist_]:=Check[Quiet[LogLikelihood[dist,d]],Indeterminate];
pp[x_,vd_,dd_,dnd_]:=Check[Module[{likelihoodDiseased,likelihoodNonDiseased,evidence},
likelihoodDiseased=PDF[dd,x];
likelihoodNonDiseased=PDF[dnd,x];
evidence=likelihoodDiseased*vd+likelihoodNonDiseased*(1-vd);
likelihoodDiseased*vd/evidence],Indeterminate];
pp[x1_,x2_,vd_,dd_,dnd_]:=Check[Module[{likelihoodDiseased,likelihoodNonDiseased,evidence},
	likelihoodDiseased=PDF[dd,{x1,x2}];
likelihoodNonDiseased=PDF[dnd,{x1,x2}];
evidence=likelihoodDiseased*vd+likelihoodNonDiseased*(1-vd);likelihoodDiseased*vd/evidence],Indeterminate];
pp[x_,vd_,m1_,s1_,m2_,s2_,dist1_,dist2_]:=Check[Module[{diseasedDist,nondiseasedDist,likelihoodDiseased,likelihoodNonDiseased,evidence},
likelihoodDiseased=Switch[dist1,"normal",N[PDF[NormalDistribution[m1,s1],x]],"lognormal",N[PDF[logNormalDistribution[m1,s1],x]],"gamma",N[PDF[gammaDistribution[m1,s1],x]]];
likelihoodNonDiseased=Switch[dist2,"normal",N[PDF[NormalDistribution[m2,s2],x]],"lognormal",N[PDF[logNormalDistribution[m2,s2],x]],"gamma",N[PDF[gammaDistribution[m2,s2],x]]];
evidence=likelihoodDiseased*vd+likelihoodNonDiseased*(1-vd);
likelihoodDiseased*vd/evidence],Indeterminate];
pp[x1_,x2_,vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist11_,dist12_,dist21_,dist22_]:=Check[Module[{likelihoodDiseased,likelihoodNonDiseased,evidence},
	likelihoodDiseased=N[PDF[biVariateDistribution[m11,s11,m21,s21,cc1,dist11,dist21],{x1,x2}]];
likelihoodNonDiseased=N[PDF[biVariateDistribution[m12,s12,m22,s22,cc2,dist12,dist22],{x1,x2}]];
evidence=likelihoodDiseased*vd+likelihoodNonDiseased*(1-vd);
likelihoodDiseased*vd/evidence],Indeterminate];
cpp1[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_,msr_,val_]:=
Quiet[Switch[val,1,
Switch[msr,1,
Plot[{pp[x,vd,m11,s11,m12,s12,dist111,dist121],pp[x,vd,m11,s11,m12,s12,dist112,dist122]},{x, Max[m11-2s11,0],m11+2s11},PlotRange->All,AxesLabel->{"1st measurand","P(disease)"},PlotLegends->Placed[{"P(disease) of 1st set","P(disease) of 2nd set "},Bottom],PlotLabel->"posterior probability for disease vs 1st measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],2,
Plot[{pp[x,vd,m21,s21,m22,s22,dist211,dist221],pp[x,vd,m21,s21,m22,s22,dist212,dist222]},{x, Max[m21-2s21,0], m21+2s21},PlotRange->All,AxesLabel->{"2nd measurand","P(disease)"},PlotLegends->Placed[{"P(disease) of 1st set","P(disease) of 2nd set "},Bottom],PlotLabel->"posterior probability for disease vs 2nd measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist111,dist121,dist211,dist221],pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist112,dist122,dist212,dist222]},{x, Max[m11-2s11,0], m11+2s11},{y, Max[m21-2s21,0], m21+2s21},PlotRange->All, PlotPoints->100,AxesLabel->{"1st measurand"," 2nd measurand","P(disease)"},PlotLegends->Placed[{"P(disease) of 1st set","P(disease) of 2nd set "},Bottom],PlotLabel->"posterior probability for disease vs 1st and 2nd measurands",ImageSize->550,PlotTheme->"Scientific"]],
2,
Switch[msr,1,
Plot[-pp[x,vd,m11,s11,m12,s12,dist111,dist121]+pp[x,vd,m11,s11,m12,s12,dist112,dist122],{x, Max[m11-2s11,0],m11+2s11},PlotRange->All,AxesLabel->{"1st measurand","ΔP(disease)"},PlotLegends->Placed[{"P(disease) of 2nd set -P(disease) of 1st set"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 1st measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],2,
Plot[-pp[x,vd,m21,s21,m22,s22,dist211,dist221]+pp[x,vd,m21,s21,m22,s22,dist212,dist222],{x, Max[m21-2s21,0],m21+2s21},PlotRange->All,AxesLabel->{"2nd measurand","ΔP(disease)"},PlotLegends->Placed[{"P(disease) of 2nd set -P(disease) of 1st set"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 2nd measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[-pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist111,dist121,dist211,dist221]+pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist112,dist122,dist212,dist222],{x, Max[m11-2s11,0],m11+2s11},{y, Max[m21-2s21,0],m21+2s21},PlotRange->All,AxesLabel->{"1st measurand"," 2nd measurand","ΔP(disease)"},PlotLegends->Placed[{"P(disease) of 2nd set -P(disease) of 1st set"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 1st and 2nd measurands",ImageSize->550,PlotTheme->"Scientific"]]]];
cpp2[vd_,dd11_,dd12_,dd21_,dd22_,dd121_,dd122_,dnd11_,dnd12_,dnd21_,dnd22_,dnd121_,dnd122_,msr_,val_]:=
Quiet[Switch[val,
1,Switch[msr,1,
Plot[{pp[x,vd,dd11,dnd11],pp[x,vd,dd12,dnd12]},{x,Max[Min[Mean[dd11],Mean[dd12]]-2Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],Max[Mean[dd11],Mean[dd12]]+2Max[StandardDeviation[dd11],StandardDeviation[dd12]]},PlotRange->All,ImageSize->550,Exclusions->None,AxesLabel->{"","P(disease)"},PlotLegends->Placed[{"P(disease) of 1st kernel","P(disease) of 2nd kernel"},Below],PlotLabel->"posterior probability for disease vs 1st measurand",PlotTheme->"Scientific",Filling->Bottom],2,
Plot[{pp[x,vd,dd21,dnd21],pp[x,vd,dd22,dnd22]},{x,Max[Min[Mean[dd21],Mean[dd22]]-2Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],Max[Mean[dd21],Mean[dd22]]+2Max[StandardDeviation[dd21],StandardDeviation[dd22]]},PlotRange->All, ImageSize->550,Exclusions->None,AxesLabel->{"","P(disease)"},
PlotLegends->Placed[{"P(disease) of 1st kernel","P(disease) of 2nd kernel"},Below],PlotLabel->"posterior probability for disease vs 2nd measurand",PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{pp[x,y,vd,dd121,dnd121],pp[x,y,vd,dd122,dnd122]},{x,Max[Min[Mean[dd11],Mean[dd12]]-2Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],Max[Mean[dd11],Mean[dd12]]+2Max[StandardDeviation[dd11],StandardDeviation[dd12]]},{y,Max[Min[Mean[dd21],Mean[dd22]]-2Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],Max[Mean[dd21],Mean[dd22]]+2Max[StandardDeviation[dd21],StandardDeviation[dd22]]},PlotRange->All, PlotPoints->100, ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand","2nd measurand","P(disease)"},
PlotLegends->Placed[{"P(disease) of 1st kernel","P(disease) of 2nd kernel"},Below],PlotLabel->"posterior probability for disease vs 1st & 2nd measurands",PlotPoints->100,PlotTheme->"Scientific",Exclusions->None]],
2,Switch[msr,1,
Plot[{-pp[x,vd,dd11,dnd11]+pp[x,vd,dd12,dnd12]},{x,Max[Min[Mean[dd11],Mean[dd12]]-2Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],Max[Mean[dd11],Mean[dd12]]+2Max[StandardDeviation[dd11],StandardDeviation[dd12]]},PlotRange->All,ImageSize->550,Exclusions->None,AxesLabel->{"","ΔP(disease)"},PlotLegends->Placed[{"P(disease)of 2nd kernel-P(disease) of 1st kernel"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 1st measurand",PlotTheme->"Scientific",Filling->Bottom],2,
Plot[{-pp[x,vd,dd21,dnd21]+pp[x,vd,dd22,dnd22]},{x,Max[Min[Mean[dd21],Mean[dd22]]-2Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],Max[Mean[dd21],Mean[dd22]]+2Max[StandardDeviation[dd21],StandardDeviation[dd22]]},PlotRange->All, ImageSize->550,Exclusions->None,AxesLabel->{"","ΔP(disease)"},
PlotLegends->Placed[{"P(disease) of 2nd kernel-P(disease) of 1st kernel"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 2nd measurand",PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{-pp[x,y,vd,dd121,dnd121]+pp[x,y,vd,dd122,dnd122]},{x,Max[Min[Mean[dd11],Mean[dd12]]-2Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],Max[Mean[dd11],Mean[dd12]]+2Max[StandardDeviation[dd11],StandardDeviation[dd12]]},{y,Max[Min[Mean[dd21],Mean[dd22]]-2Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],Max[Mean[dd21],Mean[dd22]]+2Max[StandardDeviation[dd21],StandardDeviation[dd22]]},PlotRange->All, PlotPoints->100, ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand","2nd measurand","ΔP(disease)"},
PlotLegends->Placed[{"P(disease) of 2nd kernel-P(disease) of 1st kernel"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 1st & 2nd measurands",PlotPoints->100,PlotTheme->"Scientific",Exclusions->None]]]];
cpp3[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dd12_,dnd1_,dnd2_,dnd12_,msr_,val_]:=
Quiet[
Switch[val,1,
Switch[msr,1,
Plot[{pp[x,vd,m11,s11,m12,s12,dist11,dist12],pp[x,vd,dd1,dnd1]},{x, Max[Min[m11,Mean[dd1]]-2Max[s11,StandardDeviation[dd1]],0], Max[m11,Mean[dd1]]+2Max[s11,StandardDeviation[dd1]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand","P(disease)"},PlotLegends->Placed[{"parametric P(disease)","KDE P(disease)"},Bottom],PlotLabel->"posterior probability for disease vs 1st measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],2,
Plot[{pp[x,vd,m21,s21,m22,s22,dist21,dist22],pp[x,vd,dd2,dnd2]},{x, Max[Min[m21,Mean[dd2]]-2Max[s21,StandardDeviation[dd2]],0], Max[m21,Mean[dd2]]+2Max[s21,StandardDeviation[dd2]]},PlotRange->All,Exclusions->None,AxesLabel->{"2nd measurand","P(disease)"},PlotLegends->Placed[{"parametric P(disease)","KDE P(disease)"},Bottom],PlotLabel->"posterior probability for disease vs 2nd measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist11,dist12,dist21,dist22],pp[x,y,vd,dd12,dnd12]},{x, Max[Min[m11,Mean[dd1]]-2Max[s11,StandardDeviation[dd1]],0], Max[m11,Mean[dd1]]+2Max[s11,StandardDeviation[dd1]]},{y, Max[Min[m21,Mean[dd2]]-2Max[s21,StandardDeviation[dd2]],0], Max[m21,Mean[dd2]]+2Max[s21,StandardDeviation[dd2]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand","P(disease)"},PlotLegends->Placed[{"parametric P(disease)","KDE P(disease)"},Bottom],PlotLabel->"posterior probability for disease vs 1st and 2nd measurands",ImageSize->550,PlotTheme->"Scientific"]],
2,
Switch[msr,1,
Plot[{-pp[x,vd,m11,s11,m12,s12,dist11,dist12]+pp[x,vd,dd1,dnd1]},{x, Max[Min[m11,Mean[dd1]]-2Max[s11,StandardDeviation[dd1]],0], Max[m11,Mean[dd1]]+2Max[s11,StandardDeviation[dd1]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand","ΔP(disease)"},PlotLegends->Placed[{"KDE P(disease)"-"parametric P(disease)"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 1st measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],2,
Plot[{-pp[x,vd,m21,s21,m22,s22,dist21,dist22]+pp[x,vd,dd2,dnd2]},{x, Max[Min[m21,Mean[dd2]]-2Max[s21,StandardDeviation[dd2]],0], Max[m21,Mean[dd2]]+2Max[s21,StandardDeviation[dd2]]},PlotRange->All,Exclusions->None,AxesLabel->{"2nd measurand","ΔP(disease)"},PlotLegends->Placed[{"KDE P(disease)"-"parametric P(disease)"},Bottom],PlotLabel->"difference of posterior probabilities for disease vs 2nd measurand",ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{-pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist11,dist12,dist21,dist22]+pp[x,y,vd,dd12,dnd12]},{x, Max[Min[m11,Mean[dd1]]-2Max[s11,StandardDeviation[dd1]],0], Max[m11,Mean[dd1]]+2Max[s11,StandardDeviation[dd1]]},{y, Max[Min[m21,Mean[dd2]]-2Max[s21,StandardDeviation[dd2]],0], Max[m21,Mean[dd2]]+2Max[s21,StandardDeviation[dd2]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand","ΔP(disease)"},PlotLegends->Placed[{"KDE P(disease)"-"parametric P(disease)"},Bottom],PlotLabel->"difference of posterior probability for disease vs 1st and 2nd measurands",ImageSize->550,PlotTheme->"Scientific"]]]];
pdf[x_,m_,s_,dist_]:=Check[Switch[dist,"normal",N[PDF[NormalDistribution[m,s],x]],"lognormal",N[PDF[logNormalDistribution[m,s],x]],"gamma",N[PDF[gammaDistribution[m,s],x]]],Indeterminate];
pdf[x1_,x2_,m1_,s1_,m2_,s2_,cc_,dist1_,dist2_]:=Check[N[PDF[biVariateDistribution[m1,s1,m2,s2,cc,dist1,dist2],{x1,x2}]],Indeterminate];
cpdf1[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_,msr_,pop_]:=
Quiet[Switch[pop,
1,
Switch[msr,
1,
Plot[{pdf[x,m11,s11,dist111],pdf[x,m11,s11,dist112]},{x,Min[Max[m22-3s22,0],mid1],Max[m22+3s22,mad1]},PlotRange->All,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in diseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],2,
	Plot[ {pdf[x,m21,s21,dist211],pdf[x,m21,s21,dist212]},{x,Min[Max[m21-3s21,0],mid2],Max[m21+3s21,mad2]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in diseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{pdf[x,y,m11,s11,m21,s21,cc1,dist111,dist211],pdf[x,y,m11,s11,m21,s21,cc1,dist112,dist212]},{x,Min[Max[m22-3s22,0],mid1],Max[m22+3s22,mad1]},{y,Min[Max[m21-3s21,0],mid2],Max[m21+3s21,mad2]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in diseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
2,
Switch[msr,
1,
Plot[{pdf[x,m12,s12,dist121],pdf[x,m12,s12,dist122]},{x,Min[Max[m12-3s12,0],mind1],Max[m12+3s12,mand1]},PlotRange->All,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in nondiseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
2,
	Plot[{pdf[x,m22,s22,dist221],pdf[x,m22,s22,dist222]},{x,Min[Max[m22-3s22,0],mind2],Max[m22+3s22,mand2]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in nondiseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
3,
Plot3D[{pdf[x,y,m12,s12,m22,s22,cc2,dist121,dist221],pdf[x,y,m12,s12,m22,s22,cc2,dist122,dist222]},{x,Min[Max[m12-3s12,0],mind1],Max[m12+3s12,mand1]},{y,Min[Max[m22-3s22,0],mind2],Max[m22+3s22,mand2]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in nondiseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific"]],
3,
Switch[msr,
1,
Plot[{vd pdf[x,m11,s11,dist111],vd pdf[x,m11,s11,dist112],(1-vd)pdf[x,m12,s12,dist121],(1-vd)pdf[x,m12,s12,dist122]},{x,Min[Max[Min[m11,m12]-3Max[s11,s12],0],mid1,mind1],Max[Max[m11,m12]+3Max[s11,s12],mad1,mand1]},PlotRange->All,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand",PlotLegends->Placed[{"1st set PDF, diseased","2nd set PDF, diseased","1st set PDF, nondiseased","2nd set PDF, nondiseased"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
2,
	Plot[{vd pdf[x,m21,s21,dist211],vd pdf[x,m21,s21,dist212],(1-vd)pdf[x,m22,s22,dist221],(1-vd)pdf[x,m22,s22,dist222]},{x,Min[Max[Min[m21,m22]-3Max[s21,s22],0],mid2,mind2],Max[Max[m21,m22]+3Max[s21,s22],mad2,mand2]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand",PlotLegends->Placed[{"1st set PDF, diseased","2nd set PDF, diseased","1st set PDF, nondiseased","2nd set PDF, nondiseased"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
3,
Plot3D[{vd pdf[x,y,m11,s11,m21,s21,cc1,dist111,dist211],vd pdf[x,y,m11,s11,m21,s21,cc1,dist112,dist212],(1-vd)pdf[x,y,m12,s12,m22,s22,cc2,dist122,dist222],(1-vd)pdf[x,y,m12,s12,m22,s22,cc2,dist121,dist221]},{x,Min[Max[Min[m11,m12]-3Max[s11,s12],0],mid1,mind1],Max[Max[m11,m12]+3Max[s11,s12],mad1,mand1]},{y,Min[Max[Min[m21,m22]-3Max[s21,s22],0],mid2,mind2],Max[Max[m21,m22]+3Max[s21,s22],mad2,mand2]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands",PlotLegends->Placed[{"1st set PDF, diseased PDF","2nd set PDF, diseased","1st set PDF, nondiseased","2nd set, nondiseased"},Bottom],ImageSize->550,PlotTheme->"Scientific"]]]];
hcpdf1[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_,msr_,pop_]:=
Quiet[Switch[pop,
1,
Switch[msr,
1,
Show[Histogram[d1,"Knuth","PDF",ImageSize->550],Plot[{pdf[x,m11,s11,dist111],pdf[x,m11,s11,dist112]},{x,Min[Max[m11-3s11,0],mid1],Max[m11+3s11,mad1]},PlotRange->All,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in diseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],2,
	Show[Histogram[d2,"Knuth","PDF",ImageSize->550],Plot[ {pdf[x,m21,s21,dist211],pdf[x,m21,s21,dist212]},{x,Min[Max[m21-3s21,0],mid2],Max[m21+3s21,mad2]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in diseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],3,
Show[Histogram3D[d12,"Knuth","PDF",ImageSize->550],Plot3D[{pdf[x,y,m11,s11,m21,s21,cc1,dist111,dist211],pdf[x,y,m11,s11,m21,s21,cc1,dist112,dist212]},{x,Min[Max[m11-3s11,0],mid1],Max[m11+3s11,mad1]},{y,Min[Max[m21-3s21,0],mid2],Max[m21+3s21,mad2]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in diseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]]],
2,
Switch[msr,
1,
Show[Histogram[nd1,"Knuth","PDF",ImageSize->550],Plot[{pdf[x,m12,s12,dist121],pdf[x,m12,s12,dist122]},{x,Min[Max[m12-3s12,0],mind1],Max[m12+3s12,mand1]},PlotRange->All,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in nondiseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
2,
	Show[Histogram[nd2,"Knuth","PDF",ImageSize->550],Plot[{pdf[x,m22,s22,dist221],pdf[x,m22,s22,dist222]},{x,Min[Max[m22-3s22,0],mind2],Max[m22+3s22,mand2]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in nondiseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
3,
Show[Histogram3D[nd12,"Knuth","PDF",ImageSize->550],Plot3D[{pdf[x,y,m12,s12,m22,s22,cc2,dist121,dist221],pdf[x,y,m12,s12,m22,s22,cc2,dist122,dist222]},{x,Min[Max[m12-3s12,0],mind1],Max[m12+3s12,mand1]},{y,Min[Max[m22-3s22,0],mind2],Max[m22+3s22,mand2]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in nondiseased",PlotLegends->Placed[{"1st set PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific"]]]]];
cpdf2[vd_,dd11_,dd12_,dd21_,dd22_,dd121_,dd122_,dnd11_,dnd12_,dnd21_,dnd22_,dnd121_,dnd122_,msr_,pop_]:=
Quiet[Switch[pop,1,Switch[msr,1,
Plot[{PDF[dd11,x],PDF[dd12,x]},{x,Min[Max[Min[Mean[dd11],Mean[dd12]]-3Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],mid1],Max[Mean[dd11],Mean[dd12]]+3Max[StandardDeviation[dd11],StandardDeviation[dd12]]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 1st measurand in diseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotTheme->"Scientific",Filling->Bottom],2,
	Plot[{PDF[dd21,x], PDF[dd22,x]},{x,Max[Min[Mean[dd21],Mean[dd22]]-3Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],Max[Mean[dd21],Mean[dd22]]+3Max[StandardDeviation[dd21],StandardDeviation[dd22]]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 2nd measurand in diseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{PDF[dd121,{x,y}],PDF[dd122,{x,y}]},{x,Max[Min[Mean[dd11],Mean[dd12]]-3Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],Max[Mean[dd11],Mean[dd12]]+3Max[StandardDeviation[dd11],StandardDeviation[dd12]]},{y,Max[Min[Mean[dd21],Mean[dd22]]-3Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],Max[Mean[dd21],Mean[dd22]]+3Max[StandardDeviation[dd21],StandardDeviation[dd22]]},PlotRange->All,PlotPoints->100,ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st & 2nd measurands in diseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotPoints->100,PlotTheme->"Scientific"]],
2,Switch[msr,1,
Plot[{PDF[dnd11,x],PDF[dnd12,x]},{x,Max[Min[Mean[dnd11],Mean[dnd12]]-3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]],0],Max[Mean[dnd11],Mean[dnd12]]+3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 1st measurand in nondiseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotTheme->"Scientific",Filling->Bottom],2,
	Plot[{PDF[dnd21,x],PDF[dnd22,x]},{x,Max[Min[Mean[dnd21],Mean[dnd22]]-3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]],0],Max[Mean[dnd21],Mean[dnd22]]+3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 2nd measurand in nondiseased",PlotLegends->Placed[{"1st kernel","2nd kernel"},Below],PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{PDF[dnd121,{x,y}],PDF[dnd122,{x,y}]},{x,Max[Min[Mean[dnd11],Mean[dnd12]]-3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]],0],Max[Mean[dnd11],Mean[dnd12]]+3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]]},{y,Max[Min[Mean[dnd21],Mean[dnd22]]-3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]],0],Max[Mean[dnd21],Mean[dnd22]]+3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]]},PlotRange->All,PlotPoints->100,ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st & 2nd measurands in nondiseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotPoints->100,PlotTheme->"Scientific"]],
3,Switch[msr,1,
Plot[{vd PDF[dd11,x],vd PDF[dd12,x],(1-vd)PDF[dnd11,x],(1-vd)PDF[dnd12,x]},{x,Max[Min[Mean[dd11],Mean[dd12],Mean[dnd11],Mean[dnd12]]-3Max[StandardDeviation[dd11],StandardDeviation[dd12],StandardDeviation[dnd11],StandardDeviation[dnd12]],0],Max[Mean[dd11],Mean[dd12],Mean[dnd11],Mean[dnd12]]+3Max[StandardDeviation[dd11],StandardDeviation[dd12],StandardDeviation[dnd11],StandardDeviation[dnd12]]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 1st measurand",PlotLegends->Placed[{"1st kernel PDF: diseased","2nd kernel PDF: diseased","1st kernel PDF: nondiseased","2nd kernel PDF: nondiseased"},Below],PlotTheme->"Scientific",Filling->Bottom],2,
	Plot[{vd PDF[dd21,x],vd PDF[dd22,x],(1-vd)PDF[dnd21,x],(1-vd)PDF[dnd22,x]},{x,Max[Min[Mean[dd21],Mean[dd22],Mean[dnd21],Mean[dnd22]]-3Max[StandardDeviation[dd21],StandardDeviation[dd22],StandardDeviation[dnd21],StandardDeviation[dnd22]],0],Max[Mean[dd21],Mean[dd22],Mean[dnd21],Mean[dnd22]]+3Max[StandardDeviation[dd21],StandardDeviation[dd22],StandardDeviation[dnd21],StandardDeviation[dnd22]]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 2nd measurand",PlotLegends->Placed[{"1st kernel PDF: diseased","2nd kernel PDF: diseased","1st kernel PDF: nondiseased","2nd kernel PDF: nondiseased"},Below],PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{vd PDF[dd121,{x,y}],vd PDF[dd122,{x,y}],(1-vd)PDF[dnd121,{x,y}],(1-vd)PDF[dnd122,{x,y}]},{x,Max[Min[Mean[dd11],Mean[dd12],Mean[dnd11],Mean[dnd12]]-3Max[StandardDeviation[dd11],StandardDeviation[dd12],StandardDeviation[dnd11],StandardDeviation[dnd12]],0],Max[Mean[dd11],Mean[dd12],Mean[dnd11],Mean[dnd12]]+3Max[StandardDeviation[dd11],StandardDeviation[dd12],StandardDeviation[dnd11],StandardDeviation[dnd12]]},{y,Max[Min[Mean[dd21],Mean[dd22],Mean[dnd21],Mean[dnd22]]-3Max[StandardDeviation[dd21],StandardDeviation[dd22],StandardDeviation[dnd21],StandardDeviation[dnd22]],0],Max[Mean[dd21],Mean[dd22],Mean[dnd21],Mean[dnd22]]+3Max[StandardDeviation[dd21],StandardDeviation[dd22],StandardDeviation[dnd21],StandardDeviation[dnd22]]},PlotRange->Full,PlotPoints->100,ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st & 2nd measurands",PlotLegends->Placed[{"1st kernel PDF: diseased","2nd kernel PDF: diseased","1st kernel PDF: nondiseased","2nd kernel PDF: nondiseased"},Below],PlotPoints->100,PlotTheme->"Scientific"]]]];
hcpdf2[vd_,dd11_,dd12_,dd21_,dd22_,dd121_,dd122_,dnd11_,dnd12_,dnd21_,dnd22_,dnd121_,dnd122_,msr_,pop_]:=
Switch[pop,1,Switch[msr,1,
Show[Histogram[d1,"Knuth","PDF",ImageSize->550],Plot[{PDF[dd11,x],PDF[dd12,x]},{x,Min[Max[Min[Mean[dd11],Mean[dd12]]-3Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],mid1],Max[Max[Mean[dd11],Mean[dd12]]+3Max[StandardDeviation[dd11],StandardDeviation[dd12]],mad1]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 1st measurand in diseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotTheme->"Scientific",Filling->Bottom]],2,
	Show[Histogram[d2,"Knuth","PDF",ImageSize->550],Plot[{PDF[dd21,x], PDF[dd22,x]},{x,Min[Max[Min[Mean[dd21],Mean[dd22]]-3Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],mid2],Max[Max[Mean[dd21],Mean[dd22]]+3Max[StandardDeviation[dd21],StandardDeviation[dd22]],mad2]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 2nd measurand in diseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotTheme->"Scientific",Filling->Bottom]],3,
Show[Histogram3D[d12,"Knuth","PDF",ImageSize->550],Plot3D[{PDF[dd121,{x,y}],PDF[dd122,{x,y}]},{x,Min[Max[Min[Mean[dd11],Mean[dd12]]-3Max[StandardDeviation[dd11],StandardDeviation[dd12]],0],mid1],Max[Max[Mean[dd11],Mean[dd12]]+3Max[StandardDeviation[dd11],StandardDeviation[dd12]],mad1]},{y,Min[Max[Min[Mean[dd21],Mean[dd22]]-3Max[StandardDeviation[dd21],StandardDeviation[dd22]],0],mid2],Max[Max[Mean[dd21],Mean[dd22]]+3Max[StandardDeviation[dd21],StandardDeviation[dd22]],mad2]},PlotRange->All,PlotPoints->100,ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st & 2nd measurands in diseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotPoints->100,PlotTheme->"Scientific"]]],
2,Switch[msr,1,
Show[Histogram[nd1,"Knuth","PDF",ImageSize->550],Plot[{PDF[dnd11,x],PDF[dnd12,x]},{x,Min[Max[Min[Mean[dnd11],Mean[dnd12]]-3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]],0],mind1],Max[Max[Mean[dnd11],Mean[dnd12]]+3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]],mand1]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 1st measurand in nondiseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotTheme->"Scientific",Filling->Bottom]],2,
	Show[Histogram[nd2,"Knuth","PDF",ImageSize->550],Plot[{PDF[dnd21,x],PDF[dnd22,x]},{x,Min[Max[Min[Mean[dnd21],Mean[dnd22]]-3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]],0],mind2],Max[Max[Mean[dnd21],Mean[dnd22]]+3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]],mand2]},PlotRange->All, ImageSize->550,Exclusions->None,PlotLabel->"PDF of 2nd measurand in nondiseased",PlotLegends->Placed[{"1st kernel","2nd kernel"},Below],PlotTheme->"Scientific",Filling->Bottom]],3,
Show[Histogram3D[nd12,"Knuth","PDF",ImageSize->550],Plot3D[{PDF[dnd121,{x,y}],PDF[dnd122,{x,y}]},{x,Min[Max[Min[Mean[dnd11],Mean[dnd12]]-3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]],0],mind1],Max[Max[Mean[dnd11],Mean[dnd12]]+3Max[StandardDeviation[dnd11],StandardDeviation[dnd12]],mand1]},{y,Min[Max[Min[Mean[dnd21],Mean[dnd22]]-3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]],0],mind2],Max[Max[Mean[dnd21],Mean[dnd22]]+3Max[StandardDeviation[dnd21],StandardDeviation[dnd22]],mand2]},PlotRange->All,PlotPoints->100,ImageSize->550,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st & 2nd measurands in nondiseased",PlotLegends->Placed[{"1st kernel PDF","2nd kernel PDF"},Below],PlotPoints->100,PlotTheme->"Scientific"]]]];
cpdf3[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dd12_,dnd1_,dnd2_,dnd12_,msr_,pop_]:=
Switch[pop,
1,
Switch[msr,
1,
Plot[{pdf[x,m11,s11,dist11],PDF[dd1,x]},{x, Max[Min[m11,Mean[dd1]]-3Max[s11,StandardDeviation[dd1]],0], Max[m11,Mean[dd1]]+3Max[s11,StandardDeviation[dd1]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in diseased",PlotLegends->Placed[{"parametric PDF","2nd set PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],2,
	Plot[ {pdf[x,m21,s21,dist21],PDF[dd2,x]},{x, Max[Min[m21,Mean[dd2]]-3Max[s21,StandardDeviation[dd2]],0], Max[m21,Mean[dd2]]+3Max[s21,StandardDeviation[dd2]]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in diseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],3,
Plot3D[{pdf[x,y,m11,s11,m21,s21,cc1,dist11,dist21],PDF[dd12,{x,y}]},{x, Max[Min[m11,Mean[dd1]]-3Max[s11,StandardDeviation[dd1]],0], Max[m11,Mean[dd1]]+Max[s11,StandardDeviation[dd1]]},{y, Max[Min[m21,Mean[dd2]]-3Max[s21,StandardDeviation[dd2]],0], Max[m21,Mean[dd2]]+Max[s21,StandardDeviation[dd2]]},PlotRange->Full,PlotPoints->100,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in diseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
2,
Switch[msr,
1,
Plot[{pdf[x,m12,s12,dist12],PDF[dnd1,x]},{x, Max[Min[m12,Mean[dnd1]]-3Max[s12,StandardDeviation[dnd1]],0], Max[m12,Mean[dnd1]]+3Max[s12,StandardDeviation[dnd1]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in nondiseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
2,
	Plot[{pdf[x,m22,s22,dist22],PDF[dnd2,x]},{x, Max[Min[m22,Mean[dnd2]]-3Max[s22,StandardDeviation[dnd2]],0], Max[m22,Mean[dnd2]]+3Max[s22,StandardDeviation[dnd2]]},PlotRange->All,Exclusions->None,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in nondiseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
3,
Plot3D[{pdf[x,y,m12,s12,m22,s22,cc2,dist12,dist22],PDF[dnd12,{x,y}]},{x, Max[Min[m12,Mean[dnd1]]-3Max[s12,StandardDeviation[dnd1]],0], Max[m12,Mean[dnd1]]+3Max[s12,StandardDeviation[dnd1]]},{y, Max[Min[m22,Mean[dnd2]]-3Max[s22,StandardDeviation[dnd2]],0], Max[m22,Mean[dnd2]]+3Max[s22,StandardDeviation[dnd2]]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in nondiseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific"]],
3,
Switch[msr,
1,
Plot[{vd pdf[x,m11,s11,dist11], vd PDF[dd1,x],(1-vd)pdf[x,m12,s12,dist12],(1-vd)PDF[dnd1,x]},{x,Max[Min[m11,m12,Mean[dd1],Mean[dnd1]]-3Max[s11,s12,StandardDeviation[dd1],StandardDeviation[dnd1]],0],Max[m11,m12,Mean[dd1],Mean[dnd1]]+3Max[s11,s12,StandardDeviation[dd1],StandardDeviation[dnd1]]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand",PlotLegends->Placed[{"parametric PDF, diseased","KDE PDF, diseased","parametric PDF, nondiseased","KDE PDF, nondiseased"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
2,
	Plot[{vd pdf[x,m21,s21,dist21],vd PDF[dd2,x],(1-vd)pdf[x,m22,s22,dist22],(1-vd)PDF[dnd2,x]},{x,Max[Min[m21,m22,Mean[dd1],Mean[dnd2]]-3Max[s21,s22,StandardDeviation[dd2],StandardDeviation[dnd2]],0],Max[m21,m22,Mean[dd2],Mean[dnd2]]+3Max[s21,s22,StandardDeviation[dd2],StandardDeviation[dnd2]]},PlotRange->All,Exclusions->None,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand",PlotLegends->Placed[{"parametric PDF, diseased","KDE PDF, diseased","parametric PDF, nondiseased","KDE PDF, nondiseased"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom],
3,
Plot3D[{vd pdf[x,y,m11,s11,m21,s21,cc1,dist11,dist21],vd PDF[dd12,{x,y}],(1-vd)pdf[x,y,m12,s12,m22,s22,cc2,dist12,dist22],(1-vd)PDF[dnd12,{x,y}]},{x,Max[Min[m11,m12,Mean[dd1],Mean[dnd1]]-3Max[s11,s12,StandardDeviation[dd1],StandardDeviation[dnd1]],0],Max[m11,m12,Mean[dd1],Mean[dnd1]]+3Max[s11,s12,StandardDeviation[dd1],StandardDeviation[dnd1]]},{y,Max[Min[m21,m22,Mean[dd1],Mean[dnd2]]-3Max[s21,s22,StandardDeviation[dd2],StandardDeviation[dnd2]],0],Max[m21,m22,Mean[dd2],Mean[dnd2]]+3Max[s21,s22,StandardDeviation[dd2],StandardDeviation[dnd2]]},PlotRange->Full,Exclusions->None,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands",PlotLegends->Placed[{"parametric PDF, diseased","KDE PDF, diseased","parametric PDF, nondiseased","KDE PDF, nondiseased"},Bottom],ImageSize->550,PlotTheme->"Scientific"]]];
hcpdf3[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dd12_,dnd1_,dnd2_,dnd12_,msr_,pop_]:=
Quiet[Switch[pop,
1,
Switch[msr,
1,
Show[Histogram[d1,"Knuth","PDF",ImageSize->550],Plot[{pdf[x,m11,s11,dist11],PDF[dd1,x]},{x,Min[ Max[Min[m11,Mean[dd1]]-3Max[s11,StandardDeviation[dd1]],0],mid1],Max[ Max[m11,Mean[dd1]]+3Max[s11,StandardDeviation[dd1]],mad1]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in diseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
2,
Show[Histogram[d2,"Knuth","PDF",ImageSize->550],Plot[ {pdf[x,m21,s21,dist21],PDF[dd2,x]},{x, Min[Max[Min[m21,Mean[dd2]]-3Max[s21,StandardDeviation[dd2]],0],mid2], Max[Max[m21,Mean[dd2]]+3Max[s21,StandardDeviation[dd2]],mad2]},PlotRange->All,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in diseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
3,
Show[Histogram3D[d12,"Knuth","PDF",ImageSize->550],Plot3D[{pdf[x,y,m11,s11,m21,s21,cc1,dist11,dist21],PDF[dd12,{x,y}]},{x,Min[ Max[Min[m11,Mean[dd1]]-3Max[s11,StandardDeviation[dd1]],0],mid1],Max[ Max[m11,Mean[dd1]]+3Max[s11,StandardDeviation[dd1]],mad1]},{y, Min[Max[Min[m21,Mean[dd2]]-3Max[s21,StandardDeviation[dd2]],0],mid2], Max[Max[m21,Mean[dd2]]+3Max[s21,StandardDeviation[dd2]],mad2]},PlotRange->Full,PlotPoints->100,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in diseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]]],
2,
Switch[msr,
1,
Show[Histogram[nd1,"Knuth","PDF",ImageSize->550],Plot[{pdf[x,m12,s12,dist12],PDF[dnd1,x]},{x,Min[ Max[Min[m12,Mean[dnd1]]-3Max[s12,StandardDeviation[dnd1]],0],mind1],Max[ Max[m12,Mean[dnd1]]+3Max[s12,StandardDeviation[dnd1]],mand1]},PlotRange->All,Exclusions->None,AxesLabel->{"1st measurand",""},PlotLabel->"PDF of 1st measurand in nondiseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
2,
	Show[Histogram[nd2,"Knuth","PDF",ImageSize->550],Plot[{pdf[x,m22,s22,dist22],PDF[dnd2,x]},{x, Min[Max[Min[m22,Mean[dnd2]]-3Max[s22,StandardDeviation[dnd2]],0],mind2], Max[Max[m22,Mean[dnd2]]+3Max[s22,StandardDeviation[dnd2]],mand2]},PlotRange->All,Exclusions->None,AxesLabel->{" 2nd measurand",""},PlotLabel->"PDF of 2nd measurand in nondiseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific",Filling->Bottom]],
3,
Show[Histogram3D[nd12,"Knuth","PDF",ImageSize->550],Plot3D[{pdf[x,y,m12,s12,m22,s22,cc2,dist12,dist22],PDF[dnd12,{x,y}]},{x,Min[ Max[Min[m12,Mean[dnd1]]-3Max[s12,StandardDeviation[dnd1]],0],mind1],Max[ Max[m12,Mean[dnd1]]+3Max[s12,StandardDeviation[dnd1]],mand1]},{y, Min[Max[Min[m22,Mean[dnd2]]-3Max[s22,StandardDeviation[dnd2]],0],mind2], Max[Max[m22,Mean[dnd2]]+3Max[s22,StandardDeviation[dnd2]],mand2]},PlotRange->Full,AxesLabel->{"1st measurand"," 2nd measurand",""},PlotLabel->"bivariate PDF of 1st and 2nd measurands in nondiseased",PlotLegends->Placed[{"parametric PDF","KDE PDF"},Bottom],ImageSize->550,PlotTheme->"Scientific"]]]]];
qqp1[m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_,msr_,pop_]:=
Switch[pop,
1,
Switch[msr,
1,
Show[Legended[QuantilePlot[d1,pdist[m11,s11,dist111],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[QuantilePlot[d1,pdist[m11,s11,dist112],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]],
2,
Show[Legended[QuantilePlot[d2,pdist[m21,s21,dist211],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[QuantilePlot[d2,pdist[m21,s21,dist212],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]]],
2,
Switch[msr,
1,
Show[Legended[QuantilePlot[nd1,pdist[m12,s12,dist121],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[QuantilePlot[nd1,pdist[m12,s12,dist122],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]],
2,
Show[Legended[QuantilePlot[nd2,pdist[m22,s22,dist221],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[QuantilePlot[nd2,pdist[m22,s22,dist222],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]]]];
qqp2[dd11_,dd12_,dd21_,dd22_,dnd11_,dnd12_,dnd21_,dnd22_,msr_,pop_]:=
Switch[pop,
1,
Switch[msr,
1,
Show[Legended[QuantilePlot[d1,dd11,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[QuantilePlot[d1,dd12,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]],
2,
Show[Legended[QuantilePlot[d2,dd21,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[QuantilePlot[d2,dd22,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]]],
2,
Switch[msr,
1,
Show[Legended[QuantilePlot[nd1,dnd11,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[QuantilePlot[nd1,dnd12,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]],
2,
Show[Legended[QuantilePlot[nd2,dnd21,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[QuantilePlot[nd2,dnd22,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q_Q plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]]]];
qqp3[m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dnd1_,dnd2_,msr_,pop_]:=
Switch[pop,
1,
Switch[msr,
1,
Show[Legended[QuantilePlot[d1,pdist[m11,s11,dist11],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[QuantilePlot[d1,dd1,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]],
2,
Show[Legended[QuantilePlot[d2,pdist[m21,s21,dist21],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[QuantilePlot[d2,dd2,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]]],
2,
Switch[msr,
1,
Show[Legended[QuantilePlot[nd1,pdist[m12,s12,dist12],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[QuantilePlot[nd1,dnd1,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]],
2,
Show[Legended[QuantilePlot[nd2,pdist[m22,s22,dist22],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[QuantilePlot[nd2,dnd2,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution quantiles","sample quantiles"},PlotLabel->"Q-Q plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]]]];
ppp1[m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_,msr_,pop_]:=
Switch[pop,
1,
Switch[msr,
1,
Show[Legended[ProbabilityPlot[d1,pdist[m11,s11,dist111],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[ProbabilityPlot[d1,pdist[m11,s11,dist112],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]],
2,
Show[Legended[ProbabilityPlot[d2,pdist[m21,s21,dist211],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[ProbabilityPlot[d2,pdist[m21,s21,dist212],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]]],
2,
Switch[msr,
1,
Show[Legended[ProbabilityPlot[nd1,pdist[m12,s12,dist121],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[ProbabilityPlot[nd1,pdist[m12,s12,dist122],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]],
2,
Show[Legended[ProbabilityPlot[nd2,pdist[m22,s22,dist221],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st set"}]],Legended[ProbabilityPlot[nd2,pdist[m22,s22,dist222],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd set"}]]]]];
ppp2[dd11_,dd12_,dd21_,dd22_,dnd11_,dnd12_,dnd21_,dnd22_,msr_,pop_]:=
Switch[pop,
1,
Switch[msr,
1,
Show[Legended[ProbabilityPlot[d1,dd11,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[ProbabilityPlot[d1,dd12,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]],
2,
Show[Legended[ProbabilityPlot[d2,dd21,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[ProbabilityPlot[d2,dd22,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]]],
2,
Switch[msr,
1,
Show[Legended[ProbabilityPlot[nd1,dnd11,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[ProbabilityPlot[nd1,dnd12,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]],
2,
Show[Legended[ProbabilityPlot[nd2,dnd21,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"1st kernel"}]],Legended[ProbabilityPlot[nd2,dnd22,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"2nd kernel"}]]]]];
ppp3[m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dnd1_,dnd2_,msr_,pop_]:=
Quiet[Switch[pop,
1,
Switch[msr,
1,
Show[Legended[ProbabilityPlot[d1,pdist[m11,s11,dist11],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[ProbabilityPlot[d1,dd1,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]],
2,
Show[Legended[ProbabilityPlot[d2,pdist[m21,s21,dist21],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[ProbabilityPlot[d2,dd2,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in diseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]]],
2,
Switch[msr,
1,
Show[Legended[ProbabilityPlot[nd1,pdist[m12,s12,dist12],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[ProbabilityPlot[nd1,dnd1,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 1st measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]],
2,
Show[Legended[ProbabilityPlot[nd2,pdist[m22,s22,dist22],Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"parametric"}]],Legended[ProbabilityPlot[nd2,dnd2,Frame->True,ImageSize->550,PlotRange->All,PlotStyle->{},FrameLabel->{"distribution probabilities","sample probabilities"},PlotLabel->"P-P plot for 2nd measurand in nondiseased",ReferenceLineStyle->Directive[Black,Thin,Dashing[{}]]],PointLegend[{},{"KDE"}]]]]]];
pdist[m_,s_,dist_]:=Switch[dist,"normal",NormalDistribution[m,s],"lognormal",logNormalDistribution[m,s],"gamma",gammaDistribution[m,s]];
median[m_,s_,dist_]:=Check[Switch[dist,"normal",N[Median[NormalDistribution[m,s]]],"lognormal",N[Median[logNormalDistribution[m,s]]],"gamma",N[Median[gammaDistribution[m,s]]]],Indeterminate];
skewness[m_,s_,dist_]:=Check[Switch[dist,"normal",N[Skewness[NormalDistribution[m,s]]],"lognormal",N[Skewness[logNormalDistribution[m,s]]],"gamma",N[Skewness[gammaDistribution[m,s]]]],Indeterminate];
kurtosis[m_,s_,dist_]:=Check[Switch[dist,"normal",N[Kurtosis[NormalDistribution[m,s]]],"lognormal",N[Kurtosis[logNormalDistribution[m,s]]],"gamma",N[Kurtosis[gammaDistribution[m,s]]]],Indeterminate];
ps1[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_]:=
Text@Grid[Transpose[{
{Style["measurements statistics",Bold],"","","1st measurand",SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,"2nd measurand",SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove},
{SpanFromLeft,SpanFromLeft,"parameters",
"mean","median","sd","skewness","kurtosis","log-likelihood","prior probability","correlation coefficient",SpanFromAbove,"mean","median","sd","skewness","kurtosis","log-likelihood","prior probability"},
{SpanFromLeft,"diseased","1st set",
NumberForm[m11,{7,4}],NumberForm[median[m11,s11,dist111],{7,4}],NumberForm[s11,{7,4}],NumberForm[skewness[m11,s11,dist111],{7,4}],NumberForm[kurtosis[m11,s11,dist111],{7,4}],NumberForm[ll[d1,pdist[m11,s11,dist111]],{7,4}],NumberForm[vd,{7,3}],NumberForm[cc1,{7,4}],SpanFromAbove,NumberForm[m21,{7,4}],NumberForm[median[m21,s21,dist211],{7,4}],NumberForm[s21,{7,4}],NumberForm[skewness[m21,s21,dist211],{7,4}],NumberForm[kurtosis[m21,s21,dist211],{7,4}],NumberForm[ll[d2,pdist[m21,s21,dist211]],{7,4}],NumberForm[vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"2nd set",
NumberForm[m11,{7,4}],NumberForm[median[m11,s11,dist122],{7,4}],NumberForm[s11,{7,4}],NumberForm[skewness[m11,s11,dist122],{7,4}],NumberForm[kurtosis[m11,s11,dist122],{7,4}],NumberForm[ll[d1,pdist[m11,s11,dist112]],{7,4}],NumberForm[vd,{7,3}],NumberForm[cc1,{7,4}],SpanFromAbove,NumberForm[m21,{7,4}],NumberForm[median[m21,s21,dist212],{7,4}],NumberForm[s21,{7,4}],NumberForm[skewness[m21,s21,dist212],{7,4}],NumberForm[kurtosis[m21,s21,dist212],{7,4}],NumberForm[ll[d2,pdist[m21,s21,dist212]],{7,4}],NumberForm[vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"dataset",
NumberForm[md1,{7,4}],NumberForm[mdd1,{7,4}],NumberForm[sdd1,{7,4}],NumberForm[skd1,{7,4}],NumberForm[kud1,{7,4}],"",NumberForm[v,{7,3}],NumberForm[cod,{7,4}],SpanFromAbove,NumberForm[md2,{7,4}],NumberForm[mdd2,{7,4}],NumberForm[sdd2,{7,4}],NumberForm[skd2,{7,4}],NumberForm[kud2,{7,4}],"",NumberForm[v,{7,3}]},
{SpanFromLeft,"nondiseased","1st set",
NumberForm[m12,{7,4}],NumberForm[median[m12,s12,dist121],{7,4}],NumberForm[s12,{7,4}],NumberForm[skewness[m12,s12,dist121],{7,4}],NumberForm[kurtosis[m12,s12,dist121],{7,4}],NumberForm[ll[nd1,pdist[m12,s12,dist121]],{7,4}],NumberForm[1-vd,{7,3}],NumberForm[cc2,{7,4}],SpanFromAbove,NumberForm[m22,{7,4}],NumberForm[median[m22,s22,dist221],{7,4}],NumberForm[s22,{7,4}],NumberForm[skewness[m22,s22,dist221],{7,4}],NumberForm[kurtosis[m12,s12,dist121],{7,4}],NumberForm[ll[nd2,pdist[m22,s22,dist221]],{7,4}],NumberForm[1-vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"2nd set",
NumberForm[m12,{7,4}],NumberForm[median[m12,s12,dist122],{7,4}],NumberForm[s12,{7,4}],NumberForm[skewness[m12,s12,dist122],{7,4}],NumberForm[kurtosis[m12,s12,dist122],{7,4}],NumberForm[ll[nd1,pdist[m12,s12,dist122]],{7,4}],NumberForm[1-vd,{7,3}],NumberForm[cc2,{7,4}],SpanFromAbove,NumberForm[m22,{7,4}],NumberForm[median[m22,s22,dist222],{7,4}],NumberForm[s22,{7,4}],NumberForm[skewness[m22,s22,dist222],{7,4}],NumberForm[kurtosis[m22,s22,dist222],{7,4}],NumberForm[ll[nd2,pdist[m22,s22,dist222]],{7,4}],NumberForm[1-vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"dataset",
NumberForm[mdnd1,{7,4}],NumberForm[mnd1,{7,4}],NumberForm[sdnd1,{7,4}],NumberForm[sknd1,{7,4}],NumberForm[kund1,{7,4}],"",NumberForm[1-v,{7,3}],NumberForm[cond,{7,4}],SpanFromAbove,NumberForm[mnd2,{7,4}],NumberForm[mdnd2,{7,4}],NumberForm[sdnd2,{7,4}],NumberForm[sknd2,{7,4}],NumberForm[kund2,{7,4}],"",NumberForm[1-v,{7,3}]}
}],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{Automatic,Automatic}];
ps2[vd_,dd11_,dd12_,dd21_,dd22_,dd121_,dd122_,dnd11_,dnd12_,dnd21_,dnd22_,dnd121_,dnd122_]:=
Text@Grid[Transpose[
{
{Style["measurements statistics",Bold],"","","1st measurand",SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,"2nd measurand",SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove},
{SpanFromLeft,SpanFromLeft,"parameters",
"mean","median","sd","skewness","kurtosis","log-likelihood","prior probability","correlation coefficient",SpanFromAbove,"mean","median","sd","skewness","kurtosis","log-likelihood","prior probability"},
{SpanFromLeft,"diseased","1st distribution",
NumberForm[Mean[dd11],{7,4}],NumberForm[Median[dd11],{7,4}],NumberForm[StandardDeviation[dd11],{7,4}],NumberForm[Skewness[dd11],{7,4}],NumberForm[Kurtosis[dd11],{7,4}],NumberForm[ll[d1,dd11],{7,4}],NumberForm[vd,{7,3}],
NumberForm[Correlation[dd121][[1,2]],{7,4}],SpanFromAbove,
NumberForm[Mean[dd21],{7,4}],NumberForm[Median[dd21],{7,4}],NumberForm[StandardDeviation[dd21],{7,4}],NumberForm[Skewness[dd21],{7,4}],NumberForm[Kurtosis[dd21],{7,4}],NumberForm[ll[d2,dd21],{7,4}],NumberForm[vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"2nd distribution",
NumberForm[Mean[dd12],{7,4}],NumberForm[Median[dd12],{7,4}],NumberForm[StandardDeviation[dd12],{7,4}],NumberForm[Skewness[dd12],{7,4}],NumberForm[Kurtosis[dd12],{7,4}],NumberForm[ll[d1,dd12],{7,4}],NumberForm[vd,{7,3}],
NumberForm[Correlation[dd122][[1,2]],{7,4}],SpanFromAbove,NumberForm[Mean[dd22],{7,4}],NumberForm[Median[dd22],{7,4}],NumberForm[StandardDeviation[dd22],{7,4}],NumberForm[Skewness[dd22],{7,4}],NumberForm[Kurtosis[dd22],{7,4}],NumberForm[ll[d2,dd22],{7,4}],NumberForm[vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"dataset",
NumberForm[md1,{7,4}],NumberForm[mdd1,{7,4}],NumberForm[sdd1,{7,4}],NumberForm[skd1,{7,4}],NumberForm[kud1,{7,4}],"",NumberForm[v,{7,3}],NumberForm[cod,{7,4}],SpanFromAbove,NumberForm[md2,{7,4}],NumberForm[mdd2,{7,4}],NumberForm[sdd2,{7,4}],NumberForm[skd2,{7,4}],NumberForm[kud2,{7,4}],"",NumberForm[v,{7,3}]},
{SpanFromLeft,"nondiseased","1st distribution",
NumberForm[Mean[dnd11],{7,4}],NumberForm[Median[dnd11],{7,4}],NumberForm[StandardDeviation[dnd11],{7,4}],NumberForm[Skewness[dnd11],{7,4}],NumberForm[Kurtosis[dnd11],{7,4}],NumberForm[ll[nd1,dnd11],{7,4}],NumberForm[1-vd,{7,3}],
NumberForm[Correlation[dnd121][[1,2]],{7,4}],SpanFromAbove,NumberForm[Mean[dnd21],{7,4}],NumberForm[Median[dnd21],{7,4}],NumberForm[StandardDeviation[dnd21],{7,4}],NumberForm[Skewness[dnd21],{7,4}],NumberForm[Kurtosis[dnd21],{7,4}],NumberForm[ll[nd2,dnd21],{7,4}],NumberForm[1-vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"2nd distribution",
NumberForm[Mean[dnd12],{7,4}],NumberForm[Median[dnd12],{7,4}],NumberForm[StandardDeviation[dnd12],{7,4}],NumberForm[Skewness[dnd12],{7,4}],NumberForm[Kurtosis[dnd12],{7,4}],NumberForm[ll[nd1,dnd12],{7,4}],NumberForm[1-vd,{7,3}],
NumberForm[Correlation[dnd122][[1,2]],{7,4}],SpanFromAbove,NumberForm[Mean[dnd22],{7,4}],NumberForm[Median[dnd22],{7,4}],NumberForm[StandardDeviation[dnd22],{7,4}],NumberForm[Skewness[dnd22],{7,4}],NumberForm[Kurtosis[dnd22],{7,4}],NumberForm[ll[nd2,dnd22],{7,4}],NumberForm[1-vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"dataset",
NumberForm[mnd1,{7,4}],NumberForm[mdnd1,{7,4}],NumberForm[sdnd1,{7,4}],NumberForm[sknd1,{7,4}],NumberForm[kund1,{7,4}],"",NumberForm[1-v,{7,3}],NumberForm[cond,{7,4}],SpanFromAbove,NumberForm[mnd2,{7,4}],NumberForm[mdnd2,{7,4}],NumberForm[sdnd2,{7,4}],NumberForm[sknd2,{7,4}],NumberForm[kund2,{7,4}],"",NumberForm[1-v,{7,3}]}
}
],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{Automatic,Automatic}];
ps3[vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dd12_,dnd1_,dnd2_,dnd12_]:=
Text@Grid[Transpose[
{
{Style["measurements statistics",Bold],"","","1st measurand",SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,"2nd measurand",SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove,SpanFromAbove},
{SpanFromLeft,SpanFromLeft,"parameters",
"mean","median","sd","skewness","kurtosis","log-likelihood","prior probability","correlation coefficient",SpanFromAbove,"mean","median","sd","skewness","kurtosis","log-likelihood","prior probability"},
{SpanFromLeft,"diseased","parametric",
NumberForm[m11,{7,4}],NumberForm[median[m11,s11,dist11],{7,4}],NumberForm[s11,{7,4}],NumberForm[skewness[m11,s11,dist11],{7,4}],NumberForm[kurtosis[m11,s11,dist11],{7,4}],NumberForm[ll[d1,pdist[m11,s11,dist11]],{7,4}],NumberForm[vd,{7,3}],NumberForm[cc1,{7,4}],SpanFromAbove,NumberForm[m21,{7,4}],NumberForm[median[m21,s21,dist21],{7,4}],NumberForm[s21,{7,4}],NumberForm[skewness[m21,s21,dist21],{7,4}],NumberForm[kurtosis[m21,s21,dist21],{7,4}],NumberForm[ll[d2,pdist[m21,s21,dist21]],{7,4}],NumberForm[vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"KDE",
NumberForm[Mean[dd1],{7,4}],NumberForm[Median[dd1],{7,4}],NumberForm[StandardDeviation[dd1],{7,4}],NumberForm[Skewness[dd1],{7,4}],NumberForm[Kurtosis[dd1],{7,4}],NumberForm[ll[d1,dd1],{7,4}],NumberForm[vd,{7,3}],
NumberForm[Correlation[dd12][[1,2]],{7,4}],SpanFromAbove,
NumberForm[Mean[dd2],{7,4}],NumberForm[Median[dd2],{7,4}],NumberForm[StandardDeviation[dd2],{7,4}],NumberForm[Skewness[dd2],{7,4}],NumberForm[Kurtosis[dd2],{7,4}],NumberForm[ll[d2,dd2],{7,4}],NumberForm[vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"dataset",
NumberForm[md1,{7,4}],NumberForm[mdd1,{7,4}],NumberForm[sdd1,{7,4}],NumberForm[skd1,{7,4}],NumberForm[kud1,{7,4}],"",NumberForm[v,{7,3}],NumberForm[cod,{7,4}],SpanFromAbove,NumberForm[md2,{7,4}],NumberForm[mdd2,{7,4}],NumberForm[sdd2,{7,4}],NumberForm[skd2,{7,4}],NumberForm[kud2,{7,4}],"",NumberForm[v,{7,3}]},
{SpanFromLeft,"nondiseased","parametric",
NumberForm[m12,{7,4}],NumberForm[median[m12,s12,dist12],{7,4}],NumberForm[s12,{7,4}],NumberForm[skewness[m12,s12,dist12],{7,4}],NumberForm[kurtosis[m12,s12,dist12],{7,4}],NumberForm[ll[nd1,pdist[m12,s12,dist12]],{7,4}],NumberForm[1-vd,{7,3}],NumberForm[cc2,{7,4}],SpanFromAbove,NumberForm[m22,{7,4}],NumberForm[median[m22,s22,dist22],{7,4}],NumberForm[s22,{7,4}],NumberForm[skewness[m22,s22,dist22],{7,4}],NumberForm[kurtosis[m22,s22,dist22],{7,4}],NumberForm[ll[nd2,pdist[m22,s22,dist22]],{7,4}],NumberForm[1-vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"KDE",
NumberForm[Mean[dnd1],{7,4}],NumberForm[Median[dnd1],{7,4}],NumberForm[StandardDeviation[dnd1],{7,4}],NumberForm[Skewness[dnd1],{7,4}],NumberForm[Kurtosis[dnd1],{7,4}],NumberForm[ll[nd1,dnd1],{7,4}],NumberForm[1-vd,{7,3}],
NumberForm[Correlation[dnd12][[1,2]],{7,4}],SpanFromAbove,
NumberForm[Mean[dnd2],{7,4}],NumberForm[Median[dnd2],{7,4}],NumberForm[StandardDeviation[dnd2],{7,4}],NumberForm[Skewness[dnd2],{7,4}],NumberForm[Kurtosis[dnd2],{7,4}],NumberForm[ll[nd2,dnd2],{7,4}],NumberForm[1-vd,{7,3}]},
{SpanFromLeft,SpanFromLeft,"dataset",
NumberForm[mnd1,{7,4}],NumberForm[mdnd1,{7,4}],NumberForm[sdnd1,{7,4}],NumberForm[sknd1,{7,4}],NumberForm[kund1,{7,4}],"",NumberForm[1-v,{7,3}],NumberForm[cond,{7,4}],SpanFromAbove,NumberForm[mnd2,{7,4}],NumberForm[mdnd2,{7,4}],NumberForm[sdnd2,{7,4}],NumberForm[sknd2,{7,4}],NumberForm[kund2,{7,4}],"",NumberForm[1-v,{7,3}]}
}
],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{Automatic,Automatic}];
ppt1[x_,y_,vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist111_,dist121_,dist211_,dist221_,dist112_,dist122_,dist212_,dist222_]:=
Text@Grid[Transpose[
{
{Style["prior probability for disease",Bold],"prevalence",Style["posterior probability for disease",Bold],"","1st measurand = "<> ToString[NumberForm[x,{3,1}]]," 2nd measurand = "<> ToString[NumberForm[y,{3,1}]],"1st measurand = "<> ToString[NumberForm[x,{3,1}]]<> " & 2nd measurand = "<> ToString[NumberForm[y,{3,1}]]},
{SpanFromLeft,
NumberForm[vd,{7,3}],
SpanFromLeft,
"1st set",
pp[x,vd,m11,s11,m12,s12,dist111,dist121],
pp[y,vd,m21,s21,m22,s22,dist211,dist221],
pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist111,dist121,dist211,dist221]},
{SpanFromLeft,
SpanFromLeft,
SpanFromLeft,
"2nd set",
pp[x,vd,m11,s11,m12,s12,dist112,dist122],
pp[y,vd,m21,s21,m22,s22,dist212,dist222],
pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist112,dist122,dist212,dist222]},
{SpanFromLeft,
SpanFromLeft,
SpanFromLeft,
"difference",
pp[x,vd,m11,s11,m12,s12,dist112,dist122]-pp[x,vd,m11,s11,m12,s12,dist111,dist121],
pp[y,vd,m21,s21,m22,s22,dist212,dist222]-pp[y,vd,m21,s21,m22,s22,dist211,dist221],
pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist112,dist122,dist212,dist222]-pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist111,dist121,dist211,dist221]}
}
],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{Automatic,Automatic}];
ppt2[x_,y_,vd_,dd11_,dd12_,dd21_,dd22_,dd121_,dd122_,dnd11_,dnd12_,dnd21_,dnd22_,dnd121_,dnd122_]:=
Text@Grid[Transpose[
{
{Style["prior probability for disease",Bold],"prevalence",Style["posterior probability for disease",Bold],"","1st measurand = "<> ToString[NumberForm[x,{3,1}]],"2nd measurand = "<> ToString[NumberForm[y,{3,1}]],"1st measurand = "<> ToString[NumberForm[x,{3,1}]]<> " & 2nd measurand = "<> ToString[NumberForm[y,{3,1}]]},
{SpanFromLeft,
NumberForm[vd,{7,3}],
SpanFromLeft,
"1st distribution",
pp[x,vd,dd11,dnd11],
pp[y,vd,dd21,dnd21],
pp[x,y,vd,dd121,dnd121]},
{SpanFromLeft,
SpanFromLeft,
SpanFromLeft,
"2nd distribution",
pp[x,vd,dd12,dnd12],
pp[y,vd,dd22,dnd22],
pp[x,y,vd,dd122,dnd122]},
{SpanFromLeft,
SpanFromLeft,
SpanFromLeft,
"difference",
pp[x,vd,dd12,dnd12]-pp[x,vd,dd11,dnd11],
pp[y,vd,dd22,dnd22]-pp[y,vd,dd21,dnd21],
pp[x,y,vd,dd122,dnd122]-pp[x,y,vd,dd121,dnd121]}
}
],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{Automatic,Automatic}];
ppt3[x_,y_,vd_,m11_,s11_,m12_,s12_,m21_,s21_,m22_,s22_,cc1_,cc2_,dist11_,dist12_,dist21_,dist22_,dd1_,dd2_,dd12_,dnd1_,dnd2_,dnd12_]:=
Text@Grid[Transpose[
{
{Style["prior probability for disease",Bold],"prevalence",Style["posterior probability for disease",Bold],"","1st measurand = "<> ToString[NumberForm[x,{3,1}]]," 2nd measurand = "<> ToString[NumberForm[y,{3,1}]],"1st measurand = "<> ToString[NumberForm[x,{3,1}]]<> " & 2nd measurand = "<> ToString[NumberForm[y,{3,1}]]},
{SpanFromLeft,
NumberForm[vd,{7,3}],
SpanFromLeft,
"parametric",
pp[x,vd,m11,s11,m12,s12,dist11,dist12],
pp[y,vd,m21,s21,m22,s22,dist21,dist22],
pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist11,dist12,dist21,dist22]},
{SpanFromLeft,
SpanFromLeft,
SpanFromLeft,
"KDE",
pp[x,vd,dd1,dnd1],
pp[y,vd,dd2,dnd2],
pp[x,y,vd,dd12,dnd12]},
{SpanFromLeft,
SpanFromLeft,
SpanFromLeft,
"difference",
-pp[x,vd,m11,s11,m12,s12,dist11,dist12]+pp[x,vd,dd1,dnd1],
-pp[y,vd,m21,s21,m22,s22,dist21,dist22]+pp[y,vd,dd2,dnd2],
-pp[x,y,vd,m11,s11,m12,s12,m21,s21,m22,s22,cc1,cc2,dist11,dist12,dist21,dist22]+pp[x,y,vd,dd12,dnd12]}}],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{Automatic,Automatic}];


Quiet[TabView[
{"parametric"->
TabView[
{"plots"->
TabView[
{"P(disease)"->Manipulate[Pane[cpp1[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22,msr,val],900,Alignment->Center],
{{val,2,""},{1->"probabilities",2->"difference of probabilities"},ControlPlacement->Left},{{msr,1,"measurand"},{1->"1st",2->"2nd",3->"1st & 2nd"},ControlPlacement->Left},
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st set of parametric distributions:",Bold],
{{ddist11,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist11,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist21,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist21,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["2nd set of parametric distributions:",Bold],
{{ddist12,"gamma","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist12,"gamma","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist22,"gamma","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist22,"gamma","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"PDF"->Manipulate[Pane[Switch[h,1,cpdf1[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22,msr,pop],2,hcpdf1[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22,msr,pop]],650,Alignment->Center],
Column[{Style["histograms:",Bold],Control[{{h,2,""},{1->"no",2->"yes"}}],Style["plot PDF for:",Bold],Dynamic[If[h==1,Control[{{pop,3,""},{1->"diseased",2->"nondiseased",3->"total"}}],pop=2;Control[{{pop,2,""},{1->"diseased",2->"nondiseased"}}]]],Control[{{msr,1,"measurand: "},{1->"1st",2->"2nd",3->"1st & 2nd"}}]}],
"",
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st set of parametric distributions:",Bold],
{{ddist11,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist11,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist21,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist21,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["2nd set of parametric distributions:",Bold],
{{ddist12,"gamma","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist12,"gamma","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist22,"gamma","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist22,"gamma","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"Q-Q plot"->Manipulate[Pane[qqp1[μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22,msr,pop],670,Alignment->Center],
Style["Q-Q plot for:",Bold],
{{pop,1,"population: "},{1->"diseased",2->"nondiseased"},ControlPlacement->Left},
{{msr,1,"measurand: "},{1->"1st",2->"2nd"},ControlPlacement->Left},
Style["measurements statistics:",Bold],
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st set of parametric distributions:",Bold],
{{ddist11,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist11,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist21,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist21,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["2nd set of parametric distributions:",Bold],
{{ddist12,"gamma","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist12,"gamma","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist22,"gamma","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist22,"gamma","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"P-P plot"->Manipulate[Pane[ppp1[μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22,msr,pop],670,Alignment->Center],
Style["P-P plot for:",Bold],
{{pop,1,"population: "},{1->"diseased",2->"nondiseased"},ControlPlacement->Left},
{{msr,1,"measurand: "},{1->"1st",2->"2nd"},ControlPlacement->Left},
"",
Style["measurements statistics:",Bold],
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st set of parametric distributions:",Bold],
{{ddist11,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist11,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist21,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist21,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["2nd set of parametric distributions:",Bold],
{{ddist12,"gamma","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist12,"gamma","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist22,"gamma","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist22,"gamma","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True]},ImageSize->Automatic],
"tables"->
TabView[
{"measurements statistics"->
Manipulate[Pane[ps1[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22],
 800,Alignment->Center],
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st set of parametric distributions:",Bold],
{{ddist11,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist11,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist21,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist21,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["2nd set of parametric distributions:",Bold],
{{ddist12,"gamma","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist12,"gamma","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist22,"gamma","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist22,"gamma","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"P(disease)"->
Manipulate[Pane[ppt1[x,y,vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist11,nddist11,ddist21,nddist21,ddist12,nddist12,ddist22,nddist22], 800,Alignment->Center],
Style["measurands",Bold],
{{x,126,"1st measurand"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{y,6.5,"2nd measurand"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st set of parametric distributions:",Bold],
{{ddist11,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist11,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist21,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist21,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["2nd set of parametric distributions:",Bold],
{{ddist12,"gamma","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist12,"gamma","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist22,"gamma","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist22,"gamma","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True]},ImageSize->Automatic]},ImageSize->Automatic],
"KDE"->
TabView[
{"plots"->
TabView[
{"P(disease)"->
Manipulate[
dd11=Quiet[SmoothKernelDistribution[d1,{"Standardized",w111},"Gaussian"]];
dnd11=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w121}, "Gaussian"]];
dd21=Quiet[SmoothKernelDistribution[d2,{"Standardized",w211},"Gaussian"]];
dnd21=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w221},"Gaussian"]];
dd121=Quiet[SmoothKernelDistribution[d12,{w111 sdd1,w211 sdd2},{"Radial","Gaussian"}]];
dnd121=Quiet[SmoothKernelDistribution[nd12,{w121 sdnd1,w221 sdnd2},{"Radial","Gaussian"}]];
dd12=Quiet[SmoothKernelDistribution[d1,{"Standardized",w112},"Gaussian"]];
dnd12=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w122}, "Gaussian"]];
dd22=Quiet[SmoothKernelDistribution[d2,{"Standardized",w212},"Gaussian"]];
dnd22=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w222},"Gaussian"]];
dd122=Quiet[SmoothKernelDistribution[d12,{w112 sdd1,w212 sdd2},{"Radial","Gaussian"}]];
dnd122=Quiet[SmoothKernelDistribution[nd12,{w122 sdnd1,w222 sdnd2},{"Radial","Gaussian"}]];
Pane[cpp2[vd,dd11,dd12,dd21,dd22,dd121,dd122,dnd11,dnd12,dnd21,dnd22,dnd121,dnd122,msr,val],900,Alignment->Center],
{{val,1,""},{1->"probabilities",2->"difference of probabilities"},ControlPlacement->Left},{{msr,1,"measurand"},{1->"1st",2->"2nd",3->"1st & 2nd"},ControlPlacement->Left},
"",
Style["prior probability for disease (prevalence):",Bold],
{{vd,0.055,""},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w111,0.16,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w121,0.17,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w211,0.17,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w221,0.17,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["2nd kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w112,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w122,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w212,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w222,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"PDF"->
	Manipulate[
dd11=Quiet[SmoothKernelDistribution[d1,{"Standardized",w111},"Gaussian"]];
dnd11=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w121}, "Gaussian"]];
dd21=Quiet[SmoothKernelDistribution[d2,{"Standardized",w211},"Gaussian"]];
dnd21=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w221},"Gaussian"]];
dd121=Quiet[SmoothKernelDistribution[d12,{w111 sdd1,w121 sdd2},{"Radial","Gaussian"}]];
dnd121=Quiet[SmoothKernelDistribution[nd12,{w211 sdnd1,w221 sdnd2},{"Radial","Gaussian"}]];
dd12=Quiet[SmoothKernelDistribution[d1,{"Standardized",w112},"Gaussian"]];
dnd12=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w122}, "Gaussian"]];
dd22=Quiet[SmoothKernelDistribution[d2,{"Standardized",w212},"Gaussian"]];
dnd22=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w222},"Gaussian"]];
dd122=Quiet[SmoothKernelDistribution[d12,{w112 sdd1,w122 sdd2},{"Radial","Gaussian"}]];
dnd122=Quiet[SmoothKernelDistribution[nd12,{w212 sdnd1,w222 sdnd2},{"Radial","Gaussian"}]];
Pane[Switch[h,1,cpdf2[vd,dd11,dd12,dd21,dd22,dd121,dd122,dnd11,dnd12,dnd21,dnd22,dnd121,dnd122,msr,pop],2,hcpdf2[vd,dd11,dd12,dd21,dd22,dd121,dd122,dnd11,dnd12,dnd21,dnd22,dnd121,dnd122,msr,pop]],650,Alignment->Center],
Column[{Style["histograms:",Bold],Control[{{h,2,""},{1->"no",2->"yes"}}],Style["plot PDF for:",Bold],Dynamic[If[h==1,Control[{{pop,3,"population: "},{1->"diseased",2->"nondiseased",3->"total"}}],Control[{{pop,1,"population: "},{1->"diseased",2->"nondiseased"}}]]],Control[{{msr,1,"measurand: "},{1->"1st",2->"2nd",3->"1st & 2nd"}}]}],
"",
Style["prior probability for disease (prevalence):",Bold],
{{vd,0.055,""},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w111,0.16,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w121,0.17,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w211,0.17,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w221,0.17,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["2nd kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w112,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w122,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w212,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w222,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"Q-Q Plot"->
	Manipulate[
dd11=Quiet[SmoothKernelDistribution[d1,{"Standardized",w111},"Gaussian"]];
dnd11=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w121}, "Gaussian"]];
dd21=Quiet[SmoothKernelDistribution[d2,{"Standardized",w211},"Gaussian"]];
dnd21=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w221},"Gaussian"]];
dd12=Quiet[SmoothKernelDistribution[d1,{"Standardized",w112},"Gaussian"]];
dnd12=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w122}, "Gaussian"]];
dd22=Quiet[SmoothKernelDistribution[d2,{"Standardized",w212},"Gaussian"]];
dnd22=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w222},"Gaussian"]];
Pane[qqp2[dd11,dd12,dd21,dd22,dnd11,dnd12,dnd21,dnd22,msr,pop],670,Alignment->Center],
Style["Q-Q plot for:",Bold],
{{pop,1,"population: "},{1->"diseased",2->"nondiseased"},ControlPlacement->Left},
{{msr,1,"measurand: "},{1->"1st",2->"2nd"},ControlPlacement->Left},
"",
Style["1st kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w111,0.16,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w121,0.17,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w211,0.17,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w221,0.17,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["2nd kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w112,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w122,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w212,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w222,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"P-P Plot"->
	Manipulate[
dd11=Quiet[SmoothKernelDistribution[d1,{"Standardized",w111},"Gaussian"]];
dnd11=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w121}, "Gaussian"]];
dd21=Quiet[SmoothKernelDistribution[d2,{"Standardized",w211},"Gaussian"]];
dnd21=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w221},"Gaussian"]];
dd12=Quiet[SmoothKernelDistribution[d1,{"Standardized",w112},"Gaussian"]];
dnd12=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w122}, "Gaussian"]];
dd22=Quiet[SmoothKernelDistribution[d2,{"Standardized",w212},"Gaussian"]];
dnd22=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w222},"Gaussian"]];
Pane[ppp2[dd11,dd12,dd21,dd22,dnd11,dnd12,dnd21,dnd22,msr,pop],670,Alignment->Center],
Style["P-P plot for:",Bold],
{{pop,1,"population: "},{1->"diseased",2->"nondiseased"},ControlPlacement->Left},
{{msr,1,"measurand: "},{1->"1st",2->"2nd"},ControlPlacement->Left},
"",
Style["1st kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w111,0.16,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w121,0.17,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w211,0.17,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w221,0.17,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["2nd kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w112,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w122,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w212,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w222,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True]},
ImageSize->Automatic],
"tables"->
TabView[
{"measurements statistics"->
Manipulate[
dd11=Quiet[SmoothKernelDistribution[d1,{"Standardized",w111},"Gaussian"]];
dnd11=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w121}, "Gaussian"]];
dd21=Quiet[SmoothKernelDistribution[d2,{"Standardized",w211},"Gaussian"]];
dnd21=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w221},"Gaussian"]];
dd121=Quiet[SmoothKernelDistribution[d12,{w111 sdd1,w121 sdd2},{"Radial","Gaussian"}]];
dnd121=Quiet[SmoothKernelDistribution[nd12,{w211 sdnd1,w221 sdnd2},{"Radial","Gaussian"}]];
dd12=Quiet[SmoothKernelDistribution[d1,{"Standardized",w112},"Gaussian"]];
dnd12=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w122}, "Gaussian"]];
dd22=Quiet[SmoothKernelDistribution[d2,{"Standardized",w212},"Gaussian"]];
dnd22=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w222},"Gaussian"]];
dd122=Quiet[SmoothKernelDistribution[d12,{w112 sdd1,w122 sdd2},{"Radial","Gaussian"}]];
dnd122=Quiet[SmoothKernelDistribution[nd12,{w212 sdnd1,w222 sdnd2},{"Radial","Gaussian"}]];
Pane[ps2[vd,dd11,dd12,dd21,dd22,dd121,dd122,dnd11,dnd12,dnd21,dnd22,dnd121,dnd122],900,Alignment->Center],
Style["prior probability for disease (prevalence):",Bold],
{{vd,0.055,""},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w111,0.16,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w121,0.17,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w211,0.17,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w221,0.17,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["2nd kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w112,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w122,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w212,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w222,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"P(disease)"->
Manipulate[
dd11=Quiet[SmoothKernelDistribution[d1,{"Standardized",w111},"Gaussian"]];
dnd11=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w121}, "Gaussian"]];
dd21=Quiet[SmoothKernelDistribution[d2,{"Standardized",w211},"Gaussian"]];
dnd21=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w221},"Gaussian"]];
dd121=Quiet[SmoothKernelDistribution[d12,{w111 sdd1,w121 sdd2},{"Radial","Gaussian"}]];
dnd121=Quiet[SmoothKernelDistribution[nd12,{w211 sdnd1,w221 sdnd2},{"Radial","Gaussian"}]];
dd12=Quiet[SmoothKernelDistribution[d1,{"Standardized",w112},"Gaussian"]];
dnd12=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w122}, "Gaussian"]];
dd22=Quiet[SmoothKernelDistribution[d2,{"Standardized",w212},"Gaussian"]];
dnd22=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w222},"Gaussian"]];
dd122=Quiet[SmoothKernelDistribution[d12,{w112 sdd1,w122 sdd2},{"Radial","Gaussian"}]];
dnd122=Quiet[SmoothKernelDistribution[nd12,{w212 sdnd1,w222 sdnd2},{"Radial","Gaussian"}]];
Pane[ppt2[x,y,vd,dd11,dd12,dd21,dd22,dd121,dd122,dnd11,dnd12,dnd21,dnd22,dnd121,dnd122],900,Alignment->Center],
Style["test results",Bold],
{{x,126,"1st measurand"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{y,6.5,"2nd measurand"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["prior probability for disease (prevalence):",Bold],
{{vd,0.055,""},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["1st kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w111,0.16,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w121,0.17,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w211,0.17,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w221,0.17,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["2nd kernel distribution",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w112,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w122,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w212,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w222,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True]}]},ImageSize->Automatic],
"parametric vs KDE"->
TabView[
{"plots"->
TabView[
{"P(disease)"->
Manipulate[
dd1=Quiet[SmoothKernelDistribution[d1,{"Standardized",w11},"Gaussian"]];
dnd1=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w12}, "Gaussian"]];
dd2=Quiet[SmoothKernelDistribution[d2,{"Standardized",w21},"Gaussian"]];
dnd2=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w22},"Gaussian"]];
dd12=Quiet[SmoothKernelDistribution[d12,{w11 sdd1,w21 sdd2},{"Radial","Gaussian"}]];
dnd12=Quiet[SmoothKernelDistribution[nd12,{w12 sdnd1,w22 sdnd2},{"Radial","Gaussian"}]];
Pane[cpp3[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dd12,dnd1,dnd2,dnd12,msr,val],900,Alignment->Center],
{{val,1,""},{1->"probabilities",2->"difference of probabilities"},ControlPlacement->Left},{{msr,2,"measurand"},{1->"1st",2->"2nd",3->"1st & 2nd"},ControlPlacement->Left},
"",
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["parametric distributions:",Bold],
{{ddist1,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist1,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist2,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist2,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["KDE :",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w11,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w12,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w21,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w22,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"PDF"->
	Manipulate[
dd1=Quiet[SmoothKernelDistribution[d1,{"Standardized",w11},"Gaussian"]];
dnd1=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w12}, "Gaussian"]];
dd2=Quiet[SmoothKernelDistribution[d2,{"Standardized",w21},"Gaussian"]];
dnd2=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w22},"Gaussian"]];
dd12=Quiet[SmoothKernelDistribution[d12,{w11 sdd1,w12 sdd2},{"Radial","Gaussian"}]];
dnd12=Quiet[SmoothKernelDistribution[nd12,{w21 sdnd1,w22 sdnd2},{"Radial","Gaussian"}]];
Pane[Switch[h,1,cpdf3[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dd12,dnd1,dnd2,dnd12,msr,pop],2,hcpdf3[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dd12,dnd1,dnd2,dnd12,msr,pop]],650,Alignment->Center],
Column[{Style["histograms:",Bold],Control[{{h,2,""},{1->"no",2->"yes"}}],Style["plot PDF for:",Bold],Dynamic[If[h==1,Control[{{pop,3,""},{1->"diseased",2->"nondiseased",3->"total"}}],pop=1;Control[{{pop,1,""},{1->"diseased",2->"nondiseased"}}]]],Control[{{msr,1,""},{1->"1st",2->"2nd",3->"1st & 2nd"}}]}],
"",
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["parametric distributions:",Bold],
{{ddist1,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist1,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist2,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist2,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["KDE :",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w11,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w12,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w21,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w22,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"Q-Q plot"->
	Manipulate[
dd1=Quiet[SmoothKernelDistribution[d1,{"Standardized",w11},"Gaussian"]];
dnd1=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w12}, "Gaussian"]];
dd2=Quiet[SmoothKernelDistribution[d2,{"Standardized",w21},"Gaussian"]];
dnd2=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w22},"Gaussian"]];
Pane[qqp3[μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dnd1,dnd2,msr,pop],670,Alignment->Center],
Style["Q-Q plot for:",Bold],
{{pop,1,"population: "},{1->"diseased",2->"nondiseased"},ControlPlacement->Left},
{{msr,1,"measurand: "},{1->"1st",2->"2nd"},ControlPlacement->Left},
"",
Style["measurements statistics:",Bold],
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["parametric distributions:",Bold],
{{ddist1,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist1,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist2,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist2,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["KDE :",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w11,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w12,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w21,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w22,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"P-P plot"->
	Manipulate[
dd1=Quiet[SmoothKernelDistribution[d1,{"Standardized",w11},"Gaussian"]];
dnd1=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w12}, "Gaussian"]];
dd2=Quiet[SmoothKernelDistribution[d2,{"Standardized",w21},"Gaussian"]];
dnd2=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w22},"Gaussian"]];
Pane[ppp3[μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dnd1,dnd2,msr,pop],670,Alignment->Center],
Style["P-P plot for:",Bold],
{{pop,1,"population: "},{1->"diseased",2->"nondiseased"},ControlPlacement->Left},
{{msr,1,"measurand: "},{1->"1st",2->"2nd"},ControlPlacement->Left},
"",
Style["measurements statistics:",Bold],
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["parametric distributions:",Bold],
{{ddist1,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist1,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist2,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist2,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["KDE :",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w11,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w12,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w21,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w22,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True]},
ImageSize->Automatic],
"tables"->
TabView[
{"measurements statistics"->
Manipulate[
dd1=Quiet[SmoothKernelDistribution[d1,{"Standardized",w11},"Gaussian"]];
dnd1=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w12}, "Gaussian"]];
dd2=Quiet[SmoothKernelDistribution[d2,{"Standardized",w21},"Gaussian"]];
dnd2=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w22},"Gaussian"]];
dd12=Quiet[SmoothKernelDistribution[d12,{w11 sdd1,w21 sdd2},{"Radial","Gaussian"}]];
dnd12=Quiet[SmoothKernelDistribution[nd12,{w12 sdnd1,w22 sdnd2},{"Radial","Gaussian"}]];
Pane[ps3[vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dd12,dnd1,dnd2,dnd12],900,Alignment->Center],
Style["measurements statistics:",Bold],
{{vd,0.055,"prior probability for disease (prevalence):"},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["parametric distributions:",Bold],
{{ddist1,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist1,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist2,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist2,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["KDE :",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w11,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w12,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w21,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w22,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True],
"P(disease)"->
Manipulate[
dd1=Quiet[SmoothKernelDistribution[d1,{"Standardized",w11},"Gaussian"]];
dnd1=Quiet[SmoothKernelDistribution[nd1,{"Standardized",w12}, "Gaussian"]];
dd2=Quiet[SmoothKernelDistribution[d2,{"Standardized",w21},"Gaussian"]];
dnd2=Quiet[SmoothKernelDistribution[nd2,{"Standardized",w22},"Gaussian"]];
dd12=Quiet[SmoothKernelDistribution[d12,{w11 sdd1,w21 sdd2},{"Radial","Gaussian"}]];
dnd12=Quiet[SmoothKernelDistribution[nd12,{w12 sdnd1,w22 sdnd2},{"Radial","Gaussian"}]];
Pane[ppt3[x,y,vd,μ11,σ11,μ12,σ12,μ21,σ21,μ22,σ22,dcc,ndcc,ddist1,nddist1,ddist2,nddist2,dd1,dd2,dd12,dnd1,dnd2,dnd12],900,Alignment->Center],
Style["test results",Bold],
{{x,126,"1st measurand"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{y,6.5,"2nd measurand"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
"",
Style["prior probability for disease (prevalence):",Bold],
{{vd,0.055,""},0.010,0.500,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["measurements statistics:",Bold],
{{μ11,141.3,"mean of 1st measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ11,54.0,"sd of 1st measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ12,99.9,"mean of 1st measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ12,10.1,"sd of 1st measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ21,6.67,"mean of 2nd measurand in diseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ21,1.57,"sd of 2nd measurand in diseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{μ22,5.47,"mean of 2nd measurand in nondiseased"},0.01,10000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{σ22,0.38,"sd of 2nd measurand in nondiseased"},0.01,3000.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{dcc,0.914,"correlation coefficient in of two measurands in diseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
{{ndcc,0.320,"correlation coefficient in of two measurands in nondiseased"},0.100,1.000,0.001,Appearance->"Labeled",ImageSize->Small},
"",
Style["parametric distributions:",Bold],
{{ddist1,"lognormal","distribution of 1st measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist1,"lognormal","distribution of 1st measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{ddist2,"lognormal","distribution of 2nd measurand in diseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
{{nddist2,"lognormal","distribution of 2nd measurand in nondiseased"},{"normal"->"normal","lognormal"->"lognormal","gamma"->"gamma"}} ,
"",
Style["KDE :",Bold],
Style["smoothing bandwidths in sd units:",Bold],
{{w11,0.32,"1st measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w12,0.34,"1st measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w21,0.34,"2nd measurand in diseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
{{w22,0.35,"2nd measurand in nondiseased"},0.01,2.00,0.01,Appearance->"Labeled",ImageSize->Small},
 ControlPlacement->Left,ContinuousAction->False,SaveDefinitions->True]}]},ImageSize->Automatic]},
ImageSize->Automatic]]

Abbreviations
PDF: probability density function
KDE: kernel density estimator
P(disease): probability of disease

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
Bayesian Diagnosis
Version Number 1.0.6.3
Hellenic Complex Systems Laboratory 2024
This notebook is distributed under an Attribution - NonCommercial - ShareAlike 4.0 International Creative Commons License.