Plot heatmaps showing the PPV for a given Sensitivity and a range of Prevalences and False Positive values or NPV values for a given Specificity and a range of Prevalences and True Positive values
PPV_heatmap(
Min_Prevalence,
Max_Prevalence,
Sensitivity,
Min_FP = 0,
Max_FP,
overlay = "no",
overlay_labels = "",
overlay_position_FP = 1,
overlay_position_FN = 1,
overlay_prevalence_1 = 1,
overlay_prevalence_2 = 100,
uncertainty_prevalence = "high",
label_title = "",
label_subtitle = "",
Language = "en",
folder = "",
PPV_NPV = "PPV",
DEBUG = 0
)
x in the "x out of y" prevalence (y-axis): 1-Inf
y in the "x out of y" prevalence (y-axis): 1-Inf
Sensitivity of the test: 0-100
Minimum False Positives ratio to show in plot (x-axis): 1-100
Maximum False Positives ratio to show in plot (x-axis): 1-100
Show overlay: TRUE / FALSE
Labels for each point in the overlay. For example: c("80", "70", "60", "50", "40", "30", "20 y.o.")
FP value (position in the x-axis) for each point in the overlay. For example: c(7, 8, 9, 12, 14, 14)
FN value (position in the x-axis) for each point in the overlay. For example: c(7, 8, 9, 12, 14, 14)
Prevalence value (position in the y-axis) for each point in the overlay. For example: c(1, 1, 1, 2, 1, 1)
Prevalence value (position in the y-axis) for each point in the overlay. For example: c(26, 29, 44, 69, 227, 1667)
How much certainty we have about the prevalence ["high"/"low"]
Title for the plot
Subtitle for the plot
Language for the plot labels: "sp" / "en"
Where to save the plot (the filename would be automatically created using the plot parameters)
Should show PPV or NPV [PPV/NPV]
Shows debug warnings [0/1]
Shows a plot or, if given a folder argument, saves a .png version of the plot
# NOT RUN {
PPV_heatmap(Min_Prevalence = 1,
Max_Prevalence = 1000,
Sensitivity = 100,
Max_FP = 2,
Language = "en")
# }
Run the code above in your browser using DataLab