simulate_trial_with_control: Simulate a trial with fixed allocation to control group

simulate_trial_with_controlR Documentation

Simulate a trial with fixed allocation to control group

Description

Simulate a trial with fixed allocation to control group

Usage

simulate_trial_with_control(
  n_seq = c(100, 200, 300, 400),
  dat = simulate_continuous_outcome(nsubj = max(n_seq)),
  eff_eps = 0.98,
  sup_eps = 0.98,
  fut_eps = 0.98,
  delta = 2,
  alloc = rep(1/4, 4),
  prior = c(int_prior_mean = 40, int_prior_sd = 5, b_prior_sd = 5, a0 = 3, b0 = 5),
  brar = 2,
  brar_k = 0.5,
  allow_stopping = TRUE,
  make_dt = TRUE,
  ctr = contr.treatment,
  ...
)

Arguments

n_seq

The sequence of analyses by number of subjects with 12 week observation

dat

The dataset for this particular simulation

eff_eps

Effective decision threshold (relative to control)

sup_eps

Superiority decision threshold (relative to active treatments)

fut_eps

Futility decision threshold

delta

Futility reference value

alloc

Initial allocation ratio

brar

Update allocation ratio using BRAR

Value

A list (or data.table) giving the trial results


jatotterdell/mfittrial documentation built on Sept. 30, 2022, 12:23 p.m.