title: “Make a PRISMA flow chart”
author: “Jack O. Wasey”
date: “2018-08-08”
output: rmarkdown::html_vignette
bibliography: PRISMA.bib
vignette: >
%
%
%

The PRISMA Statement

This package plots a PRISMA flow chart describing the identification, screening, eligibility and inclusion or studies in systematic reviews. PRISMA is an evidence-based minimum set of items for reporting in systematic reviews and meta-analyses. PRISMA focuses on the reporting of reviews evaluating randomized trials, but can also be used as a basis for reporting systematic reviews of other types of research, particularly evaluations of interventions. [@moher_preferred_2009]

Generate a PRISMA flow chart

#install.packages("PRISMAstatement")
library(PRISMAstatement)

prisma(found = 750,
       found_other = 123,
       no_dupes = 776, 
       screened = 776, 
       screen_exclusions = 13, 
       full_text = 763,
       full_text_exclusions = 17, 
       qualitative = 746, 
       quantitative = 319,
       width = 800, height = 800)

Tweaks

Ideally, you will stick closely to the PRISMA statement, but small deviations are common. PRISMAstatement gives the option of adding a box which simply calculates the number of duplicates removed.

prisma(found = 750,
       found_other = 123,
       no_dupes = 776, 
       screened = 776, 
       screen_exclusions = 13, 
       full_text = 763,
       full_text_exclusions = 17, 
       qualitative = 746, 
       quantitative = 319,
       extra_dupes_box = TRUE)

You can also change the labels, but you will have to insert the number for any label you change. E.g.,

prisma(1000, 20, 270, 270, 10, 260, 20, 240, 107,
       labels = list(found = "FOUND", found_other = "OTHER"))

Safety

There are some hard constraints on the relationships between the numbers in each box, which are enforced by the prisma function. There are a couple of warnings given when it seems that numerically valid, but unlikely numbers are given: studies shouldn’t just disappear between each step. Arguably this is a hard stop, but there might be circumstances when additional exclusions are made which could be annotated in a figure caption.

tryCatch(
  prisma(1, 2, 3, 4, 5, 6, 7, 8, 9),
  error = function(e) e$message)
## [1] "screened <= no_dupes is not TRUE"
prisma(1000, 20, 270, 270, 10, 260, 19, 240, 107, 
       width = 100, height = 100)
## Warning in prisma(1000, 20, 270, 270, 10, 260, 19, 240, 107, width = 100, :
## After full-text exclusions, a different number of remaining articles for
## qualitative synthesis is stated.
prisma(1000, 20, 270, 270, 269, 260, 20, 240, 107, 
       width = 100, height = 100)
## Warning in prisma(1000, 20, 270, 270, 269, 260, 20, 240, 107, width =
## 100, : After screening exclusions, a different number of remaining full-
## text articles is stated.

Take care modifying the width, height and DPI

For publication quality graphics, a certain number of DPI is often requested. This is difficult to achieve with the chain of tools that PRISMAstatement uses (DiagrammeR, htmlwidgets), and also affected by the output container which may be a PDF vignette, file, browser window, etc..

prisma(found = 750,
       found_other = 123,
       no_dupes = 776, 
       screened = 776, 
       screen_exclusions = 13, 
       full_text = 763,
       full_text_exclusions = 17, 
       qualitative = 746, 
       quantitative = 319,
       width = 200, height = 200)

just set width and height

prisma(found = 750,
       found_other = 123,
       no_dupes = 776, 
       screened = 776, 
       screen_exclusions = 13, 
       full_text = 763,
       full_text_exclusions = 17, 
       qualitative = 746, 
       quantitative = 319,
       width = 200, height = 200,
       dpi = 300)

same width and height but DPI increased to 300

prisma(found = 750,
       found_other = 123,
       no_dupes = 776, 
       screened = 776, 
       screen_exclusions = 13, 
       full_text = 763,
       full_text_exclusions = 17, 
       qualitative = 746, 
       quantitative = 319,
       width = 200, height = 200,
       dpi = 36)

same width and height but DPI decreased to 36

My recommendation is to leave DPI at the default (72), and change the canvas size to achieve the correct number of pixels to fit the width of your target document. Tweaking the DPI may help (or cause) clipping.

Publications

It may be useful for publications to have a separate high-quality PDF of the PRISMA flow chart. An experimental internal function can do something like this:

prsm <- prisma(found = 750,
               found_other = 123,
               no_dupes = 776, 
               screened = 776, 
               screen_exclusions = 13, 
               full_text = 763,
               full_text_exclusions = 17, 
               qualitative = 746, 
               quantitative = 319,
               width = 200, height = 200,
               dpi = 36)
tmp_pdf <- tempfile()
PRISMAstatement:::prisma_pdf(prsm, tmp_pdf)
knitr::include_graphics(path = tmp_pdf)
unlink(tmp_pdf)

References