run_a_nonsup_trial: Run a non-superiority trial

View source: R/sim_nonsuperiority.R

run_a_nonsup_trialR Documentation

Run a non-superiority trial

Description

Run a single trial using non-superiority stopping. The idea is as follows:

Usage

run_a_nonsup_trial(
  id,
  mu,
  delta,
  kappa_lo_0 = 0.01,
  kappa_lo_1 = 0.05,
  kappa_hi_0 = 0.9,
  kappa_hi_1 = 0.85,
  brar = FALSE,
  allocate_inactive = FALSE,
  return_all = FALSE
)

Arguments

id

The trial ID

mu

The true mean, must be length 13

delta

The superiority margin

kappa_lo_0

The starting threshold to deactivate poor arms

kappa_lo_1

The final threshold to deactivate poor arms

kappa_hi_0

The starting threshold for superiority

kappa_hi_1

The final threshold for 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?

Value

A list of trial quantities


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