run_a_noninf_trial: Run a non-inferiority trial

View source: R/sim_noninferiority.R

run_a_noninf_trialR Documentation

Run a non-inferiority trial

Description

Run a single trial using non-inferiority stopping. Stopping for noninferiority requires that:

Usage

run_a_noninf_trial(
  id,
  mu,
  delta_sup = 0.1,
  delta_ctr = delta_sup,
  delta_noninf = delta_sup,
  delta_pair = delta_sup,
  kappa_act_0 = 0.01,
  kappa_act_1 = 0.05,
  kappa_sup_0 = 0.95,
  kappa_sup_1 = 0.8,
  kappa_ctr_0 = 0.95,
  kappa_ctr_1 = 0.95,
  kappa_noninf_0 = 0.6,
  kappa_noninf_1 = 0.6,
  kappa_nonsup_0 = 0.1,
  kappa_nonsup_1 = 0.1,
  brar = FALSE,
  allocate_inactive = FALSE,
  return_all = FALSE,
  ind_comp_ctrl = FALSE,
  ctrl_alloc = 1/13
)

Arguments

id

The trial ID

mu

The true mean, must be length 13

delta_sup

The superiority margin

delta_ctr

The superiority margin for control comparisons

delta_noninf

The noninferiority margin

delta_pair

The margin for pairwise comparisons

kappa_act_0

The starting threshold to deactivate poor arms

kappa_act_1

The final threshold to deactivate poor arms

kappa_sup_0

The starting threshold for superiority

kappa_sup_1

The final threshold for superiority

kappa_ctr_0

The starting threshold for beating control

kappa_ctr_1

THe final threshold for beating control

kappa_noninf_0

The starting threshold for non-inferiority

kappa_noninf_1

The final threshold for non-inferiority

kappa_nonsup_0

The starting threshold for non-superiority

kappa_nonsup_1

The final threshold for non-superiority

brar

Use Response Adaptive Randomisation?

allocate_inactive

Continue to allocate subjects to arms meeting the inactive threshold?

return_all

Return all value, or only those from final analysis?

ind_comp_ctrl

Should deactivation be based on independent P(max trt arms) and P(beat ctrl) or just global P(max all arms)

Value

A list of trial quantities


jatotterdell/automaticsims documentation built on Aug. 22, 2024, 10:52 p.m.