sample_posterior: Sample Posterior Samples from a Basket Trial

Description Usage Arguments Examples

View source: R/basket.r

Description

Sample Posterior Samples from a Basket Trial

Usage

1
sample_posterior(model, num_samples = 10000)

Arguments

model

the exchangeability model

num_samples

the number of samples to draw. Default 10000

Examples

 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))
)

basket documentation built on Oct. 17, 2021, 1:07 a.m.