Description Usage Arguments Examples
View source: R/borrow_multiple.r
Fit the MEM model for multiple subgroups using borrow method.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
responses |
the number of responses in each basket. |
size |
the size of each basket. |
name |
the name of each basket. |
drug_index |
the index vector of the baskets to be studied. |
p0 |
the null response rate vector for the poster probability calculation (default 0.15). |
shape1 |
the first shape parameter(s) for the prior of each basket (default 0.5). |
shape2 |
the second shape parameter(s) for the prior of each basket (default 0.5). |
prior |
the matrix giving the prior inclusion probability for each pair of baskets. The default is on on the main diagonal and 0.5 elsewhere. |
hpd_alpha |
the highest posterior density trial significance. |
alternative |
the alternative case definition (default greater) |
call |
the call of the function (default NULL). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 6 baskets, each with enrollement size 5
trial_sizes <- rep(25, 6)
# 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 = letters[1:6]
)
borrow_multiple(trials$responses, trials$size, trials$name, drug_index = 1:2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.