sample_posterior {basket}R Documentation

Sample Posterior Samples from a Basket Trial

Description

Sample Posterior Samples from a Basket Trial

Usage

sample_posterior(model, num_samples = 10000)

Arguments

model

the exchangeability model

num_samples

the number of samples to draw. Default 10000

Examples


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


[Package basket version 0.10.11 Index]