Description Usage Arguments Value See Also
This group of functions have the purpose to graphically display and compare either the same diagnostic test across several subsets (e.g. groups formed by clinical characteristics), several diagnostic tests or a combination of both. The diagnosis
function is invocked and tests perfomances are stacked in a data.frame
, and forest plots may be called from these.
diag.subset
and forest.diag.subset
display test performance across one or several groups represented by an additional columns in the same data.frame
.
diag.stack
and forest.diag.stack
display two or more tests performances against the very same reference standard in the same sample. The index tests are represented by an additional columns in the same data.frame
.
diag.by
and forest.diag.by
display two or more tests performances against the very same reference standard, across subsets defined by a single variable. The index tests and the subset variable are represented by an additional columns in the same data.frame
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | diag.by(ref, test, group.var, data, CL = 0.95, CL.type = c("wilson",
"exact", "approximate"), group.var.labels = attr(data,
"var.labels")[match(group.var, names(data))], test.var.labels = attr(data,
"var.labels")[match(test, names(data))])
diag.stack(ref, test, data, CL = 0.95, CL.type = c("wilson", "exact",
"approximate"), var.labels = attr(data, "var.labels")[match(test,
names(data))])
diag.subset(ref, test, group.var, data, CL = 0.95, CL.type = c("wilson",
"exact", "approximate"), var.labels = attr(data,
"var.labels")[match(group.var, names(data))])
forest.diag.by(x, type = c("SeSp", "PLR"), mar1 = c(5.1, 1, 4.1, 1),
mar.se = c(5.1, 9, 4.1, 1), mar.sp = c(5.1, 1, 4.1, 9), mar.plr = c(5.1,
1, 4.1, 9), seg.list = list(col = "blue", lty = 1, lwd = 1, xpd = NA),
points.list = list(pch = 18, cex = 2, col = 1, xpd = NA, type = "p"),
var.list = list(x = 0.1, cex = 1, col = "black", font = 2, adj = 0),
cat.list = list(x = 0.2, cex = 0.95, col = "gray30", font = 3, adj = 0, xpd
= NA), x.n = 0.65, x.prev = 0.85, adj.se = 1, adj.sp = 0,
adj.plr = 0, se.xlim = "auto", sp.xlim = "auto", plr.xlim = "auto",
se.xlab = "Sensitivity", sp.xlab = "Specificity",
plr.xlab = "Positive likelihood ratio", se.pos = 0.06, sp.pos = 0.06,
plr.pos = 0.06, se.col.label = "Se [95% CI]",
sp.col.label = "Sp [95% CI]", plr.col.label = "PLR [95% CI]",
digits = 3, grid = TRUE)
forest.diag.stack(x, type = c("SeSp", "PLR"), mar1 = c(5.1, 1, 4.1, 1),
mar.se = c(5.1, 9, 4.1, 1), mar.sp = c(5.1, 1, 4.1, 9), mar.plr = c(5.1,
1, 4.1, 9), seg.list = list(col = "blue", lty = 1, lwd = 1, xpd = NA),
points.list = list(pch = 18, cex = 2, col = 1, xpd = NA, type = "p"),
var.list = list(x = 0.01, cex = 1, col = "black", font = 2, adj = 0),
num.list = list(x = 0.7, cex = 0.95, col = "gray30", font = 3, adj = 0, xpd
= NA), x.n = 0.65, x.prev = 0.85, adj.se = 1, adj.sp = 0,
adj.plr = 0, se.xlim = "auto", sp.xlim = "auto", plr.xlim = "auto",
se.xlab = "Sensitivity", sp.xlab = "Specificity",
plr.xlab = "Positive likelihood ratio", se.pos = 0.06, sp.pos = 0.06,
plr.pos = 0.06, se.col.label = "Se [95% CI]",
sp.col.label = "Sp [95% CI]", plr.col.label = "PLR [95% CI]",
digits = 3, grid = TRUE)
forest.diag.subset(x, type = c("SeSp", "PLR"), mar1 = c(5.1, 1, 4.1, 1),
mar.se = c(5.1, 9, 4.1, 1), mar.sp = c(5.1, 1, 4.1, 9), mar.plr = c(5.1,
1, 4.1, 9), seg.list = list(col = "blue", lty = 1, lwd = 1, xpd = NA),
points.list = list(pch = 18, cex = 2, col = 1, xpd = NA, type = "p"),
var.list = list(x = 0.1, cex = 1, col = "black", font = 2, adj = 0),
cat.list = list(x = 0.2, cex = 0.95, col = "gray30", font = 3, adj = 0, xpd
= NA), x.n = 0.65, x.prev = 0.85, adj.se = 1, adj.sp = 0,
adj.plr = 0, se.xlim = "auto", sp.xlim = "auto", plr.xlim = "auto",
se.xlab = "Sensitivity", sp.xlab = "Specificity",
plr.xlab = "Positive likelihood ratio", se.pos = 0.06, sp.pos = 0.06,
plr.pos = 0.06, se.col.label = "Se [95% CI]",
sp.col.label = "Sp [95% CI]", plr.col.label = "PLR [95% CI]",
digits = 3, grid = TRUE)
|
ref |
A character vector of length 1 representing the reference standard variable in data. If it is formated as character, the function will convert it to a factor, then use the reference factor level as the absence of the condition. See |
test |
A character vector representing the test under evaluation variable in data. If the test variables are formated as character, the function will convert it to a factor, then use the reference factor level as the absence of the condition. See |
group.var |
A character vector representing the names of categorical variables in data to make subsets of data. In |
data |
A |
CL |
Confidece interval limit. Default is 0.95. Must be a number between 0 and 1. See |
CL.type |
Method to estimate the confidece interval. Default is "wilson". See |
group.var.labels, test.var.labels |
For |
var.labels |
For |
x |
An object resulting from the function |
type |
Type of forest plot. |
mar1, mar.se, mar.sp, mar.plr |
These are the margins that will be passed to |
seg.list |
A list of arguments that will be passed to |
points.list |
A list of arguments that will be passed to |
var.list |
A list of arguments that will be passed to |
cat.list |
A list of arguments that will be passed to |
x.n, x.prev |
x axis coordenates of the samples N and Prevalences in the left window (from 0 to 1). Internally, these will replace the x argument in the |
adj.se, adj.sp, adj.plr |
The adjustment of the labels argument passed to |
se.xlim, sp.xlim, plr.xlim |
Limits of the horizontal axis of each window. This will be pased to |
se.xlab, sp.xlab, plr.xlab |
Labels of the horizontal axis of each window. This will be pased to |
se.pos, sp.pos, plr.pos |
This is added to the horizontal positioning to the left of the lower limit of the axis (in case of sensitivity and positive lieklihood ratio) to plot the text of the point and confidence interval estimates. In the case of specificity, this is added to the right of th upper limit of the horizontal axis. This is intended to be an argument to make the text scoot over from the plot area and avoid overplot with the confidence interval lines in the edge of the graph. |
se.col.label, sp.col.label, plr.col.label |
Character strings representing the labels of the sensitivity, specificity and positive likelihood ratios columns. |
digits |
Number of digits to plot all numbers. Should an integer number. |
grid |
Logical. If |
num.list |
A list of arguments that will be passed to |
diag.by
, diag.stack
, diag.subset
return data.frames with each strata sample size, sample prevalence, the sensitivities, the specificities and positive likelihood ratios (and their confidence intervals). The forest.diag.by
, forest.diag.stack
, forest.diag.subset
return plots.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.