## 10.3 Traffic light plots

Frequently, researchers will want to present the risk of bias in each domain for each study assessed. The resulting plots are commonly called traffic light plots, and can be produced with robvis via the rob_traffic_light() function.

### 10.3.1 Basics

rob_traffic_light(data = data_rob2, tool = "ROB2")

To get started, a traffic light plot using the ROB2 example dataset (data_rob2) is created by running the following code:

### 10.3.2 Modifying the traffic light plot

The rob_summary() function has the following parameters:

Argument Description
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 8 columns (1 for study details, 5 for domain level judgments, 1 for overall judgments, and 1 for weights, 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.
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 An option to change the size of the “traffic light” points. Default is 20.
quiet A logical option to quietly produce the plot without displaying it. Default is FALSE.

#### 10.3.2.1 Tool (tool)

An argument to define the tool template you wish to use. The ROB2 template is demonstrated and the two other primary templates - the ROBINS-I and QUADAS-2 templates - are displayed below:

rob_traffic_light(data = data_robins, tool = "ROBINS-I")

rob_traffic_light(data = data_quadas, tool = "QUADAS-2")

#### 10.3.2.2 Colour scheme (colour)

NB: Please note the non-US English spelling of colour

The colour argument of both plotting functions allows users to select from two predefined colour schemes, “cochrane” (default) or “colourblind”, or to define their own palette by providing a vector of hex codes.

For example, to use the predefined “colourblind” palette:

rob_traffic_light(data = data_rob2, tool = "ROB2", colour = "colourblind")

And to define your own colour scheme:

rob_traffic_light(data = data_rob2, tool = "ROB2", colour = c("#f442c8","#bef441","#000000"))

When defining your own colour scheme, you must ensure that the number of discrete judgments (e.g. “Low”/“Moderate”/“High”/“Critical”) and the number of colours specified are the same. Additionally, colours must be specified in order of ascending risk-of-bias (e.g. “Low” -> “Critical”), with the first hex corresponding to “Low” risk of bias.

#### 10.3.2.3 Point size (psize)

Occasionally, when a large number of risk of bias assessment have been performed, the resulting traffic light plot may be too long to be useful. Users can address this by modifying the psize argument of the rob_traffic_light() function to a smaller number (default is 20). For example:

# Create bigger dataset (18 studies)
new_rob2_data <- rbind(data_rob2, data_rob2)
new_rob2_data$Study <- paste("Study", seq(1:length(new_rob2_data$Study)))

# Plot bigger dataset, reducing the psize argument from 20 to 8
rob_traffic_light(data = new_rob2_data, tool = "ROB2", psize = 8)