View source: R/post_summary_cont_2arm.R
| post_summary_cont_2arm | R Documentation |
The post_summary_cont_2arm function is designed to compute the
posterior summary for the treatment effect in a two-arm comparative trial
with a continuous 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_cont_2arm(
ybar_t,
ybar,
if.prior,
nf.prior,
prior.t = nf.prior,
n.t,
n,
sigma.t,
sigma,
delta,
cutoff,
method = c("SAM", "rMAP", "NP"),
alternative = c("greater", "less"),
margin = 0,
weight_rMAP = 0.5,
method.w = "LRT",
prior.odds = 1
)
ybar_t |
Observed sample mean in the treatment arm. |
ybar |
Observed sample mean in the control arm. |
if.prior |
Informative prior constructed based on historical data for the control arm, represented (approximately) as a normal 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. |
sigma.t |
Known standard deviation in the treatment arm. |
sigma |
Known standard deviation in 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 |
The treatment effect is defined as \tau = \theta_t - \theta, where
\theta_t and \theta denote the means in the treatment and
control arms, respectively. Inference is based on the posterior distribution
of \tau given the observed sample means from the two arms.
The posterior for the treatment arm is obtained by updating
prior.t using the observed sample mean ybar_t. The posterior
for the control arm depends on the selected borrowing strategy:
SAM: the control arm prior is a mixture of if.prior
and nf.prior, with adaptive mixture weight determined by the
SAM borrowing rule.
rMAP: the control arm prior is a fixed mixture of
if.prior and nf.prior, with fixed weight
weight_rMAP.
NP: the control arm prior is nf.prior only.
When alternative = "greater", inference is based on
P(\theta_t - \theta > margin \mid \bar{Y}_t, \bar{Y}). When
alternative = "less", inference is based on
P(\theta_t - \theta < -margin \mid \bar{Y}_t, \bar{Y}).
The posterior mean and posterior variance of \tau are defined as
are defined as
E(\tau \mid \bar{Y}_t, \bar{Y}) = E(\theta_t \mid \bar{Y}_t) - E(\theta \mid \bar{Y}),
and
\mathrm{Var}(\tau \mid \bar{Y}_t, \bar{Y}) = \mathrm{Var}(\theta_t \mid \bar{Y}_t) + \mathrm{Var}(\theta \mid \bar{Y}),
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.