Package 'robvis'

Title: Visualize the Results of Risk-of-Bias (ROB) Assessments
Description: Helps users in quickly visualizing risk-of-bias assessments performed as part of a systematic review. It allows users to create weighted bar-plots of the distribution of risk-of-bias judgments within each bias domain, in addition to traffic-light plots of the specific domain-level judgments for each study. The resulting figures are of publication quality and are formatted according the risk-of-bias assessment tool use to perform the assessments. Currently, the supported tools are ROB2.0 (for randomized controlled trials; Sterne et al (2019) <doi:10.1136/bmj.l4898>), ROBINS-I (for non-randomised studies of interventions; Sterne (2016) <doi:10.1136/bmj.i4919>), and Quality & Applicability of Diagnostic Accuracy Studies V2 (Whiting et al (2011) <doi:10.7326/0003-4819-155-8-201110180-00009>), and QUIPS (Hayden et al (2013) <doi:10.7326/0003-4819-158-4-201302190-00009>.
Authors: Luke McGuinness [aut, cre], Emily Kothe [ctb], Alex Fowler [ctb], Randall Boyes [ctb], Wolfgang Viechtbauer [ctb]
Maintainer: Luke McGuinness <[email protected]>
License: MIT + file LICENSE
Version: 0.3.0.900
Built: 2024-10-31 22:15:50 UTC
Source: https://github.com/mcguinlu/robvis

Help Index


Extract weights from metafor results object and append to risk-of-bias data.

Description

Used to prepare a risk-of-bias dataset to be passed to the weighted barplot function: rob_summary(..., weighted = TRUE)

Usage

rob_append_weights(data, res)

Arguments

data

Risk of bias dataset (without a weight column)

res

metafor results object

See Also

Other helper: rob_dummy(), rob_save(), rob_tools()

Examples

dat.bcg <- metadat::dat.bcg[c(1:9),]

dat <-
  metafor::escalc(
    measure = "RR",
    ai = tpos,
    bi = tneg,
    ci = cpos,
    di = cneg,
    data = dat.bcg,
    slab = paste(author, year)
  )

res <- metafor::rma(yi, vi, data = dat)

data_rob2$Study <- paste(dat$author,dat$year)

rob_weighted_data <- rob_append_weights(data_rob2[,1:7], res)

rob_summary(rob_weighted_data, tool = "ROB2", weighted = TRUE)

Create "realistic" dummy risk of bias assessment data

Description

This function returns N example risk of bias assessments for the tool specified, where N is set by the user. Assessments are "realistic" in that the judgment in the overall column is set to the highest judgement across the domains for a given study, reflecting the recommendations of the tool creators.

Usage

rob_dummy(n, tool = "ROB2", study = TRUE)

Arguments

n

Number of assessments to create

tool

Tool used for assessment (see rob_tools()). Default is "ROB2".

study

Should the returned dataframe contain a "Study" column. Default is true.

See Also

Other helper: rob_append_weights(), rob_save(), rob_tools()


Append a risk-of-bias traffic-light plot to a forest plot

Description

A wrapper for metafor::forest function, which adds a risk of bias traffic-light plot to the right-hand side of the forest plot. The heavy lifting for this function is done by metafor. Note that if not specified as additional arguments, this functions sets the header argument of metafor::forest() to TRUE.

Usage

rob_forest(
  res,
  rob_tool = "ROB2",
  rob_me = NULL,
  rob_levels = NULL,
  title = NULL,
  rob_legend = TRUE,
  rob_legend_cex = 0.9,
  ...
)

Arguments

res

Output from metafor meta-analysis function

rob_tool

The risk-of-bias assessment tool used to perform the assessments

rob_me

Optional value defining the result of the Risk-Of-Bias due to Missing Evidence (ROB-ME) assessment for this synthesis. By default (rob_me = NULL), this is omitted from the plot.

rob_levels

Vector of judgments [e.g. c("Low","Some concerns","High","Critical")] that controls the ordering of subgroups within the plot

title

Text to use for plot title

rob_legend

Logical specifying whether a legend for the risk-of-bias plot should be shown. Default is TRUE.

rob_legend_cex

Expansion factor for the risk-of-bias legend

...

Additional arguments to be passed to the metafor::forest() function

See Also

Other main: rob_summary(), rob_traffic_light()


Save risk-of-bias plots to a file using sensible parameters

Description

Save risk-of-bias plots to a file using sensible parameters

Usage

rob_save(
  rob_object,
  file = "rob_figure.png",
  height = "default",
  width = "default",
  dpi = 800
)

Arguments

rob_object

Object created using either rob_summary() or rob_traffic_light()

file

Destination file, with extension (e.g. "rob_figure.png")

height

Height of resulting image, in inches. Defaults to "default" which uses recommended values based on the number of studies included.

width

Width of resulting image, in inches. Defaults to "default" which uses recommended values based on the number of characters in the Study and Domain names. dpi

dpi

Plot resolution.

See Also

Other helper: rob_append_weights(), rob_dummy(), rob_tools()


Produce summary weighted barplots of risk-of-bias assessments.

Description

A function to convert standard risk-of-bias output to tidy data and plot a summary barplot.

Usage

rob_summary(
  data,
  tool,
  overall = TRUE,
  weighted = FALSE,
  colour = "cochrane",
  ...
)

Arguments

data

A dataframe containing summary (domain) level risk-of-bias assessments, with the first column containing the study details, the second column containing the first domain of your assessments, and the final column containing a weight to assign to each study. The function assumes that the data includes a column for overall risk-of-bias. For example, a ROB2.0 dataset would have 7 columns (1 for study details, 5 for domain level judgments, 1 for overall judgements, in that order).

tool

The risk of bias assessment tool used. RoB2.0 (tool='ROB2'), ROBINS-I (tool='ROBINS-I'), and QUADAS-2 (tool='QUADAS-2') are currently supported.

overall

An option to include a bar for overall risk-of-bias in the figure. Default is TRUE

weighted

An option to specify whether weights should be used in the barplot. Default is FALSE.

colour

An argument to specify the colour scheme for the plot. Default is 'cochrane' which used the ubiquitous Cochrane colours, while a preset option for a colour-blind friendly palette is also available (colour = 'colourblind').

...

Arguments to be passed to the tool specific functions.

Value

Risk of bias assessment barplot figure.

See Also

Other main: rob_forest(), rob_traffic_light()

Examples

data <- data.frame(
  stringsAsFactors = FALSE,
  Study = c("Study 1", "Study 2"),
  D1 = c("Low", "Some concerns"),
  D2 = c("Low", "Low"),
  D3 = c("Low", "Low"),
  D4 = c("Low", "Low"),
  D5 = c("Low", "Low"),
  Overall = c("Low", "Low"),
  Weight = c(33.33333333, 33.33333333)
)

rob_summary(data, "ROB2")

List the risk-of-bias tools for which templates are available within the package.

Description

rob_tools() will list the risk-of-bias assessment tools for which templates already exist within the robvis package. If the assessment tool you used does not appear in the list, use the "Generic" template.

Usage

rob_tools(forest = FALSE)

Arguments

forest

Show the tools supported by the forest/blobbogram functions

See Also

Other helper: rob_append_weights(), rob_dummy(), rob_save()

Examples

rob_tools()

Produce traffic-light plots of risk-of-bias assessments.

Description

A function to take a summary table of risk of bias assessments and produce a traffic light plot from it.

Usage

rob_traffic_light(
  data,
  tool,
  colour = "cochrane",
  psize = 10,
  overall = TRUE,
  ...
)

Arguments

data

A dataframe containing summary (domain) level risk-of-bias assessments, with the first column containing the study details, the second column containing the first domain of your assessments, and the final column containing a weight to assign to each study. The function assumes that the data includes a column for overall risk-of-bias. For example, a ROB2.0 dataset would have 7 columns (1 for study details, 5 for domain level judgments, and 1 for overall judgement, in that order). See

tool

The risk of bias assessment tool used. RoB2.0 (tool='ROB2'), ROBINS-I (tool='ROBINS-I'), and QUADAS-2 (tool='QUADAS-2') are currently supported.

colour

An argument to specify the colour scheme for the plot. Default is 'cochrane' which used the ubiquitous Cochrane colours, while a preset option for a colour-blind friendly palette is also available (colour = 'colourblind').

psize

Control the size of the traffic lights. Default is 10.

overall

Logical, specifying whether to include an "Overall" risk of bias column in the resulting plot

...

Arguments to be passed to the tool specific functions.

Value

Risk-of-bias assessment traffic light plot (ggplot2 object)

See Also

Other main: rob_forest(), rob_summary()

Examples

data <- data.frame(
  stringsAsFactors = FALSE,
  Study = c("Study 1", "Study 2"),
  D1 = c("Low", "Some concerns"),
  D2 = c("Low", "Low"),
  D3 = c("Low", "Low"),
  D4 = c("Low", "Low"),
  D5 = c("Low", "Low"),
  Overall = c("Low", "Low")
)

rob_traffic_light(data, "ROB2")