Learn R Programming

basksim (version 2.0.2)

geom_prior: Plot a Bayesian basket trial's prior distribution

Description

Plot a Bayesian basket trial's prior distribution

Usage

geom_prior(design, ...)

Value

A list of ggplot layers of type `geom_function`.

Arguments

design

An object created with one of the setup functions.

...

Further arguments to be passed to `geom_function`.

Examples

Run this code
# Example for a basket trial with Fujikawa's Design
design <- setup_fujikawa(k = 3, p0 = 0.2)
# One facet per basket
library(ggplot2)
ggplot() +
    geom_prior(design) +
    facet_wrap(vars(basket))
# Colour different baskets
ggplot() +
    geom_prior(design, aes(colour = basket))

Run the code above in your browser using DataLab