View source: R/post_summary_bin_2arm.R
| post_summary_bin_2arm | R Documentation |
The post_summary_bin_2arm function is designed to compute the
posterior summary for the treatment effect in a two-arm comparative trial
with a binary endpoint under one of three borrowing strategies:
self-adapting mixture prior (SAM), robust MAP prior with fixed weight
(rMAP), or non-informative prior (NP).
post_summary_bin_2arm(
x.t,
x,
if.prior,
nf.prior,
prior.t = nf.prior,
n.t,
n,
delta,
cutoff,
method = c("SAM", "rMAP", "NP"),
alternative = c("greater", "less"),
margin = 0,
weight_rMAP = 0.5,
method.w = "LRT",
prior.odds = 1,
rel.tol = 1e-08
)
x.t |
Observed number of responses in the treatment arm. |
x |
Observed number of responses in the control arm. |
if.prior |
Informative prior constructed based on historical data for the control arm, represented (approximately) as a beta mixture prior. |
nf.prior |
Non-informative prior used as the robustifying component for the control arm prior. |
prior.t |
Prior used for the treatment arm. If missing, the default
value is set to be |
n.t |
Sample size for the treatment arm. |
n |
Sample size for the control arm. |
delta |
Clinically significant difference used for the SAM prior.
This argument is only used when |
cutoff |
Posterior probability cutoff used for decision making.
The null hypothesis is rejected if the posterior tail probability
exceeds |
method |
Borrowing strategy for the control arm. Must be one of
|
alternative |
Direction of the posterior decision. Must be one of
|
margin |
Clinical margin. Must be a non-negative scalar. The default
value is |
weight_rMAP |
Weight assigned to the informative prior component
( |
method.w |
Methods used to determine the mixture weight for SAM priors.
The default method is "LRT" (Likelihood Ratio Test), the alternative option
is "PPR" (Posterior Probability Ratio). See |
prior.odds |
The prior probability of |
rel.tol |
Relative tolerance for numerical integration used to evaluate the posterior probability. |
The treatment effect is defined as \tau = \theta_t - \theta, where
\theta_t and \theta denote the response rates in the treatment
and control arms, respectively. Inference is based on the posterior
distribution of \tau given the observed response counts from the two
arms.
The posterior for the treatment arm is obtained by updating
prior.t using the observed response count x.t. The posterior
for the control arm depends on the selected borrowing strategy:
SAM: the prior for the control arm is a mixture of
if.prior and nf.prior, with adaptive mixture weight
determined by the SAM borrowing rule.
rMAP: the prior for the control arm is a fixed mixture of
if.prior and nf.prior, with fixed weight
weight_rMAP.
NP: the prior for control arm is nf.prior.
When alternative = "greater", inference is based on
P(\theta_t - \theta > margin \mid X_t, X). When
alternative = "less", inference is based on
P(\theta_t - \theta < -margin \mid X_t, X).
The posterior mean and posterior variance of \tau are defined as
E(\tau \mid X_t, X) = E(\theta_t \mid X_t) - E(\theta \mid X),
and
\mathrm{Var}(\tau \mid X_t, X) = \mathrm{Var}(\theta_t \mid X_t) + \mathrm{Var}(\theta \mid X),
where independence between the treatment and control arm posteriors is assumed conditional on the current and historical data.
A list containing the posterior probability in the requested
direction, posterior mean and variance of \tau,
decision indicator, borrowing weight used for the control arm prior,
and the corresponding trial data and method information.
SAM_weight, SAM_prior
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.