| geom_prior | R Documentation |
Plot a Bayesian basket trial's prior distribution
geom_prior(design, ...)
design |
An object created with one of the |
... |
Further arguments to be passed to 'geom_function'. |
A list of ggplot layers of type 'geom_function'.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.