View source: R/eval_oc_bin_2arm.R
| eval_oc_bin_2arm | R Documentation |
The eval_oc_bin_2arm function is designed to evaluate
repeated-sampling operating characteristics for multiple scenarios in a
two-arm comparative trial with a binary endpoint under one or more
borrowing strategies: self-adapting mixture prior (SAM), robust MAP prior
with fixed weight (rMAP), or non-informative prior (NP).
eval_oc_bin_2arm(
if.prior,
nf.prior,
prior.t = nf.prior,
theta,
theta.t,
n.t,
n,
delta,
method = c("SAM", "rMAP", "NP"),
cutoff,
alternative = c("greater", "less"),
margin = 0,
weight_rMAP = 0.5,
method.w = "LRT",
prior.odds = 1,
rel.tol = 1e-08
)
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 |
theta |
A vector of true control arm response rates. |
theta.t |
A vector of true treatment arm response rates. |
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 |
method |
Borrowing methods to evaluate. Any subset of
|
cutoff |
Posterior probability cutoff specification. Either a single
numeric value applied to all methods, or a named numeric vector/list with
method-specific cutoffs, for example
|
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 passed to scenario-level numerical
integration used in |
For each scenario, the function computes the repeated-sampling rejection
probability, bias, RMSE, and mean borrowing weight using
eval_scenario_bin_2arm.
The vectors theta and theta.t must have the same length.
Each pair (theta[i], theta.t[i]) defines one scenario.
The cutoff argument may be common across methods or method-specific.
This is useful when each borrowing method is calibrated separately before
operating characteristics are evaluated.
A data frame with one row per scenario-method combination and columns:
Scenario index.
True control arm response rate.
True treatment arm response rate.
True treatment effect, \tau = \theta_t - \theta.
Borrowing method used.
Direction of the posterior decision.
Posterior probability cutoff used.
Clinical margin used for inference.
Repeated-sampling rejection probability.
Bias of the posterior mean estimator of \theta.
Root mean squared error of the posterior mean estimator of \theta.
Average borrowing weight under the specified method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.