Description Usage Arguments References Examples
This function produces a plot with the classification of the risk of bias (or quality assessment) of individual studies included in a systematic review. Originally, it was developed inspired in QUADAS-2, but it could work equally well with any risk of bias assessment tool such as MINORT, or Cochrane's, as long the tool classifies the studies into one of three classes (or less).
1 2 3 4 5 6 7 8 | QA.plot(tab, class = c("Low risk", "High risk", "Unclear risk"), mar = c(3,
10.1, 7.1, 8.1), study.arg = list(tick = FALSE, cex = 0.9, las = 1),
pch1 = rep(16, 3), pch2 = c("+", "x", "?"), col1 = c("green", "red",
"orange"), col2 = rep("black", 3), pt.cex1 = rep(2.5, 3),
pt.cex2 = rep(0.85, 3), top.lab.arg = list(labels = attr(tab,
"var.labels")[2:ncol(tab)], srt = 45, adj = 0, cex = 0.75, xpd = NA),
auto.legend = TRUE, legend.arg = list(x = "bottom", bty = "n", inset =
-0.1, horiz = TRUE, xpd = NA))
|
tab |
A |
class |
A chracter vector of length three, with the classes of the quality assessment to match the classes in the |
mar |
The margin parameter that will be passed to |
study.arg |
A list of arguments to format the studies IDs. These arguments will be passed to |
pch1, pch2 |
These are the symbols to use in the plot for the classes 1, 2 and 3 in the |
col1, col2 |
These are the colors of the symbols ploted (the underlying - col1 - and the overploted - col2 - symbol). Each one should be of length 3. These arguments will be passed to the |
pt.cex1, pt.cex2 |
These are numerical values giving the amount by which plotting symbols should be magnified relative to the default. They represent the undelying - pt.cex1 - and the overploted - pt.cex2 - symbols. Each one should be of length 2. These arguments will be passed to the |
top.lab.arg |
A list of arguments to plot the columns labels at the top of the plot. This list of arguments will be passed to |
auto.legend |
Logical. Default is |
legend.arg |
A list of arguments to plot the legend. This list of arguments will be passed to |
Whiting PF, Rutjes AWS, Westwood ME, Mallett S, Deeks JJ, Reitsma JB, et al. QUADAS-2: A Revised Tool for the Quality Assessment of Diagnostic Accuracy Studies. Annals of Internal Medicine. 18 de outubro de 2011;155(8):529-36.
Higgins JPT, Green S. Cochrane Handbook for Systematic Reviews of Interventions. 1 edition. Chichester, England; Hoboken, NJ: Wiley; 2008. 672 p.
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 55 56 57 58 59 60 61 | # Simulating a dataset
set.seed(12345)
Study = paste0(sample(c("Goodman", "White", "Fring", "Ehrmantraut"), 10, TRUE),
", ", sample(LETTERS, 10, TRUE),"-", sample(1998:2015, 10, TRUE))
mydata <- data.frame(StudyID = Study,
v1 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE),
v2 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE),
v3 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE),
v4 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE),
v5 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE),
v6 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE),
v7 = sample(c("Low risk", "Unclear risk", "High risk"), 10, TRUE))
# Setting variables labels
attr(mydata, "var.labels") <- c("Study unique ID", "Patient selection",
"Index test", "Reference standard",
"Flow and timing", "Patient selection-aplicability",
"Index test-aplicability", "Reference standard-aplicability")
# Making a barplot with the fractions of studies with each risk of bias
# Setting the bars collors
ramp <- colorRamp(c("darkgreen", "white"))
# Making a table with the classification proportions
tabtmp <- sapply(2:5, function(i) prop.table(table(mydata[, i])))
colnames(tabtmp) <- c("Patient selection", "Index test", "Reference standard", "Flow and timing")
# Warning! Resizing the window or setting different margins may be required
# Setting the plot with two windows
par(mar = c(5.1, 13.1, 2.1, 5.1), mfrow = c(2, 1))
# Calling the superior plot
barplot(tabtmp, horiz = TRUE, cex.names = .9,
xlab = 'Proportion of studies with low, high \n or unclear risk of bias',
cex.lab = .9, las = 1, legend.text = FALSE, col = rgb(ramp(seq(0, 1, length = 3)),
max = 255))
# Making a table with the classification proportions for the inferior window
tabtmp <- sapply(6:8, function(i) prop.table(table(mydata[, i])))
colnames(tabtmp) <- c("Patient selection - applicability",
"Index test - applicability", "Reference standard - applicability")
# Calling the inferior window plot
barplot(tabtmp, legend.text = rownames(tabtmp), horiz = TRUE, cex.names = .9,
args.legend = list(x = 'top', inset = -.4, xpd = NA, horiz = TRUE, cex = .8),
xlab = 'Proportion of studies with low, high, or unclear \n concerns regarding applicability',
cex.lab = .9, las = 1, space = 1,
col = rgb(ramp(seq(0, 1, length = 3)), max = 255))
# Calling the QA.plot with default arguments
par(mar = c(5, 4, 4, 2) + 0.1, mfrow = c(1, 1))
QA.plot(mydata)
# The same plot but with squares, different colors, and fonts.
# Changing the 'class' argument order to match with the bars colors.
QA.plot(mydata, class = c("High risk", "Low risk", "Unclear risk"),
pch2 = c("x","+","?"), pch1 = rep(15, 3),
col1 = rgb(ramp(seq(0, 1, length = 3)), max = 255),
study.arg = list(tick = FALSE, cex = .9, las = 1, font = 3, col = "lightgray"))
rm(mydata, Study, tabtmp, ramp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.