## Plot the Posterior Exchangeability of a Basket Trial

### Description

The posterior exchangeability of the baskets in a MEM analysis can be visualized via an exchangeogram using this function.

### Usage

plot_pep(x, ...)


### Arguments

 x basket element of the exchangeability model. ... other options passed to ggplot2 to alter the visual characteristics of the plot. See Details for more information.

### Details

The plot_pep function attempts to place the basket names to the left of the main diagonal in a way that makes it easy to read. However, for especially long basket names options are provided. Here is a list of all options available to “fine tune” the visualizations. These auxiliary options include:

• [palette] A color palette consisting of 3 colors: the first corresponds to a low degree of exchangeability, the second to 50 exchangeability, and the third to a high degree of exchangeability. Interpolation between these colors is performed for intermediary degrees of exchangeability.

[text_color]A text string setting the color of the exchangeability values printed on the plot. (Default "white")

[tile_color]A text string setting the color of the edges of the tiles. (Default "white") (Default RColorBrewer::brewer.pal(3, "BuGn"))

• [expand] The proportion to expand the viewport (Default expand = c(0.3, 0.3))

• [text_size] The text size. (Default 4)

• [legend_position] The legend position. (Default legend_position = c(0.25, 0.8)

• [draw_legend] Should the legend be drawn? (Default TRUE)

### Examples


# Create an MEM analysis of the Vemurafenib trial data.
data(vemu_wide)

mem_analysis <- mem_exact(
vemu_wide$responders, vemu_wide$evaluable,
vemu_wide$baskets ) plot_pep(mem_analysis$basket)