View source: R/gg_diagnostic_prev.R
gg_diagnostic_prev | R Documentation |
Compare PPV or NPV by sensitivity, specificity, and prevalence.
gg_diagnostic_prev(se, sp, p, result = c("PPV", "NPV"))
gg_prev_fixed(se, sp, p, result = c("PPV", "NPV"), layout = c("lines", "band"))
se |
a vector of sensitivity estimates. For |
sp |
a vector of specificity estimates. For |
p |
a vector of prevalence values. For |
result |
whether to show the PPV or NPV on the y-axis |
layout |
whether to plot confidence region using "lines" or a filled "band." |
gg_diagnostic_prev
plots positive predictive value (PPV) or negative
predictive value (NPV) as a function of specificity, with sensitivity
separated by line types and prevalence shown across facets.
gg_prev_fixed
plots PPV or NPV as a function of prevalence, with coloured
lines separating fixed pairs of sensitivity and specificity for the lower
bound, pooled estimate, and upper bound.
Graph of PPV or NPV by specificity, sensitivity, and prevalence.
Derek Chiu
se <- c(0.5, 0.7, 0.9)
sp <- seq(0.21, 1, 0.01)
p <- c(0.32, 0.09, 0.026)
gg_diagnostic_prev(se, sp, p, result = "PPV")
gg_diagnostic_prev(se, sp, p, result = "NPV")
gg_prev_fixed(
se = c(0.67, 0.83, 0.97),
sp = c(0.86, 0.94, 0.99),
p = seq(0.01, 0.30, 0.01),
result = "PPV"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.