Description Usage Arguments Examples
Sample Posterior Samples from a Basket Trial
1 | sample_posterior(model, num_samples = 10000)
|
model |
the exchangeability model |
num_samples |
the number of samples to draw. Default 10000 |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 3 baskets, each with enrollement size 5
trial_sizes <- rep(5, 3)
# The response rates for the baskets.
resp_rate <- 0.15
# The trials: a column of the number of responses and a column of the
# the size of each trial.
trials <- data.frame(
responses = rbinom(trial_sizes, trial_sizes, resp_rate),
size = trial_sizes,
name = paste("Basket", seq_len(3))
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.