run_a_firstpastpost_trial: Run a first past the post trial

View source: R/sim_firstpastpost.R

run_a_firstpastpost_trialR Documentation

Run a first past the post trial

Description

Run a single trial using where stopping occurs as soon as one arm is superior to control.

Usage

run_a_firstpastpost_trial(
  id,
  mu,
  delta,
  kappa_lo_0 = 0.1,
  kappa_lo_1 = 0.1,
  kappa_hi_0 = 0.95,
  kappa_hi_1 = 0.95,
  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.