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 = 1,
max_Prevalence = 1000,
Sensitivity = NULL,
Specificity = NULL,
limits_Sensitivity = NULL,
limits_Specificity = NULL,
one_out_of = FALSE,
overlay = "no",
overlay_labels = "",
overlay_extra_info = FALSE,
overlay_position_FP = NULL,
overlay_position_FN = NULL,
overlay_prevalence_1 = NULL,
overlay_prevalence_2 = NULL,
uncertainty_prevalence = "high",
label_title = "",
label_subtitle = "",
Language = "en",
folder = "",
PPV_NPV = "PPV",
steps_matrix = 100,
DEBUG = FALSE,
...
)
Shows a plot or, if given a folder argument, saves a .png version of the plot
[x] out of y prevalence of disease: [1-Inf]
x out of [y] prevalence of disease: [1-Inf]
Sensitivity of test: [0-100]
Specificity of test: [0-100]
c(min Sensitivity, max Sensitivity)
c(min Specificity, max Specificity)
Show y scale as 1 out of x [TRUE, FALSE] FALSE by default
Type of overlay: ["line", "area"]
Labels for each point in the overlay. For example: c("80", "70", "60", "50", "40", "30", "20 y.o.")
show extra info in overlay? [TRUE/FALSE]
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"]
width of PPV/NPV matrix. 100 by default
Shows debug warnings [TRUE/FALSE]
Other parameters. Now used to pass dpi, height and width in the Show and Save plot section
PPV_heatmap(
min_Prevalence = 1,
max_Prevalence = 1000,
Sensitivity = 100,
Specificity = 98,
Language = "en"
)
Run the code above in your browser using DataLab