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: 2026-05-14 09:23:17 UTC
Source: https://github.com/mcguinlu/robvis

Help Index


Example directional risk-of-bias dataset

Description

This dataset is include to support experimental aspects of the package.

Usage

data_bias_direction

Format

A data frame with 20 rows and 27 variables:

result_id

integer COLUMN_DESCRIPTION

study

character COLUMN_DESCRIPTION

type

character COLUMN_DESCRIPTION

yi

double COLUMN_DESCRIPTION

vi

double COLUMN_DESCRIPTION

d1j

character COLUMN_DESCRIPTION

d1t

character COLUMN_DESCRIPTION

d1d

character COLUMN_DESCRIPTION

d2j

character COLUMN_DESCRIPTION

d2t

character COLUMN_DESCRIPTION

d2d

character COLUMN_DESCRIPTION

d3j

character COLUMN_DESCRIPTION

d3t

character COLUMN_DESCRIPTION

d3d

character COLUMN_DESCRIPTION

d4j

character COLUMN_DESCRIPTION

d4t

character COLUMN_DESCRIPTION

d4d

character COLUMN_DESCRIPTION

d5j

character COLUMN_DESCRIPTION

d5t

character COLUMN_DESCRIPTION

d5d

character COLUMN_DESCRIPTION

d6j

character COLUMN_DESCRIPTION

d6t

character COLUMN_DESCRIPTION

d6d

character COLUMN_DESCRIPTION

d7j

character COLUMN_DESCRIPTION

d7t

character COLUMN_DESCRIPTION

d7d

character COLUMN_DESCRIPTION

overall

character COLUMN_DESCRIPTION

Source

Created for this package


Example QUADAS-2 assessment dataset

Description

A data frame containing 12 example assessments performed using the risk-of-bias portion of the QUADAS-2 tool for the assessment of diagnostic accuracy studies.

Usage

data_quadas

Format

A data frame with the following 6 columns:

Study

Study identifier

D1

Domain 1 - Patient Selection

D2

Domain 2 - Index Test

D3

Domain 3 - Reference Standard

D4

Domain 4 - Flow & Timing

Overall

Overall risk of bias

Source

Created for this package


Example QUIPS assessment dataset

Description

A data frame containing 12 example assessments performed using the QUIPS (Quality In Prognosis Studies) tool.

Usage

data_quips

Format

A data frame with the following 8 columns:

Study

Study identifier

D1

Domain 1 - Bias due to participation

D2

Domain 2 - Bias due to attrition

D3

Domain 3 - Bias due to prognostic factor measurement

D4

Domain 4 - Bias due to outcome measurement

D5

Domain 5 - Bias due to confounding

D6

Domain 6 - Bias in statistical analysis and reporting

Overall

Overall risk of bias

Source

Created for this package


Example ROB1 assessment dataset

Description

A data frame containing 9 example assessments performed using the RoB1 assessment tool. Note that this dataset is distinct from other example datasets included in this package, in that the column names are the full domain names, rather than domain shortcodes (e.g. D1, D2, etc.). This is because the "Generic" (formerly "RoB1") template offered by robvis allows users to create custom risk-of-bias plots, and uses the column names of the provided dataset to define the domain names for these custom plots.

Usage

data_rob1

Format

A data frame with the following 9 columns:

Study

Study identifier

Random.sequence.generation

Domain 1

Allocation.concealment

Domain 2

Blinding.of.participants.and.personnel

Domain 3

Blinding.of.outcome.assessment

Domain 4

Incomplete.outcome.data

Domain 5

Selective.reporting

Domain 6

Other.sources.of.bias

Domain 7

Overall

Overall risk of bias

Source

Created for this package


Example ROB2.0 assessment dataset

Description

A data frame containing 9 example assessments performed using the RoB 2.0 tool for randomised controlled trials.

Usage

data_rob2

Format

A data frame with the following 7 columns:

Study

Study identifier

D1

Domain 1 - Bias arising from the randomization process

D2

Domain 2 - Bias due to deviations from intended intervention

D3

Domain 3 - Bias due to missing outcome data

D4

Domain 4 - Bias in measurement of the outcome

D5

Domain 5 - Bias in selection of the reported result

Overall

Overall risk of bias

Source

Created for this package


Example ROB2.0 (cluster variant) assessment dataset

Description

A data frame containing 9 example assessments performed using the cluster-randomised version of the RoB 2.0 tool.

Usage

data_rob2_cluster

Format

A data frame with the following 7 columns:

Study

Study identifier

D1

Domain 1 - Bias arising from the randomization process

D1b

Domain 1b - Bias arising from the timing of identification and recruitment of Individual participants in relation to timing of randomization

D2

Domain 2 - Bias due to deviations from intended intervention

D3

Domain 3 - Bias due to missing outcome data

D4

Domain 4 - Bias in measurement of the outcome

D5

Domain 5 - Bias in selection of the reported result

Overall

Overall risk of bias

Source

Created for this package


Example ROBINS-E assessment

Description

A data frame containing 10 example assessments performed using the ROBINS-E (Risk Of Bias In Non-randomised Studies - of Exposures) tool.

Usage

data_robins_e

Format

A data frame with the following 9 columns:

Study

Study identifier

D1

Domain 1 - Bias due to confounding

D2

Domain 2 - Bias arising from measurement of the exposure

D3

Domain 3 - Bias in selection of participants into the study (or into the analysis)

D4

Domain 4 - Bias due to post-exposure interventions

D5

Domain 5 - Bias due to missing data

D6

Domain 6 - Bias arising from measurement of the outcome

D7

Domain 7 - Bias in selection of the reported result

Overall

Overall risk of bias

Source

Created for this package


Example ROBINS-I assessment dataset

Description

A data frame containing 10 example assessments performed using the ROBINS-I (Risk Of Bias In Non-randomised Studies - of Interventions) tool.

Usage

data_robins_i

Format

A data frame with the following 9 columns:

Study

Study identifier

D1

Domain 1 - Bias due to confounding

D2

Domain 2 - Bias due to selection of participants

D3

Domain 3 - Bias in classification of interventions

D4

Domain 4 - Bias due to deviations from intended interventions

D5

Domain 5 - Bias due to missing data

D6

Domain 6 - Bias in measurement of outcomes

D7

Domain 7 - Bias in selection of the reported result

Overall

Overall risk of bias

Source

Created for this package


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")