Learn R Programming

meta (version 8.1-0)

traffic_light: Produce traffic light plot of risk of bias assessment

Description

Produce traffic light plot of risk of bias assessment

Usage

traffic_light(object, colour = "cochrane", psize = 15, quiet = FALSE)

Arguments

object

An object of class rob.

colour

Specify colour scheme for the traffic light plot; see rob_summary.

psize

Size of the traffic lights.

quiet

A logical to suppress the display of the traffic light plot.

Details

This is a wrapper function for rob_traffic_light of R package robvis to produce a traffic light plot of risk of bias assessment.

See Also

rob, barplot.rob, rob_traffic_light

Examples

Run this code
# Use RevMan 5 settings
oldset <- settings.meta("RevMan5")

data(caffeine)

m1 <- metabin(h.caf, n.caf, h.decaf, n.decaf, sm = "OR",
  data = caffeine, studlab = paste(study, year))

# Add risk of bias assessment to meta-analysis
m2 <- rob(D1, D2, D3, D4, D5, overall = rob, data = m1, tool = "rob2")

# Print risk of bias assessment
rob(m2)

if (FALSE) {
# Traffic light plot (R package 'robvis' must be available)
if (requireNamespace("robvis", quietly = TRUE))
 traffic_light(rob(m2))
}

# Use previous settings
settings.meta(oldset)

Run the code above in your browser using DataLab