| plot_weights | R Documentation |
Generic function for plotting the weights of a basket trial design. Currently
only implemented for designs of class fujikawa_x.
plot_weights(design, ...)
design |
An object created with one of the |
... |
Further arguments. |
A ggplot object, a plot of the weights.
design <- setup_fujikawa_x(k = 3, p0 = 0.2, backend = "exact")
# Default weight function is weights_jsd, which is identical
# to the Jensen-Shannon weights
plot_weights(design = design, n = 20, r1 = 11,
weight_params = list(tau = 0, epsilon = c(0.25, 0.5, 1, 2),
logbase = 2))
# Explicitly compare Jensen-Shannon and Hellinger weights
plot_weights(design = design, n = 20, r1 = 11,
weight_fun = baskexact::weights_fujikawa,
weight_params = list(tau = 0, epsilon = c(0.25, 0.5, 1, 2),
logbase = 2))
plot_weights(design = design, n = 20, r1 = 11, weight_fun = weights_hld,
weight_params = list(tau = 0, epsilon = c(0.25, 0.5, 1, 2),
logbase = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.