simulate_trial_anova: Simulate trial with ANOVA analysis

View source: R/simulate_trial.R

simulate_trial_anovaR Documentation

Simulate trial with ANOVA analysis

Description

Simulate trial with ANOVA analysis

Usage

simulate_trial_anova(
  n_seq = c(107, 214, 320),
  n_delay = 27,
  m_baseline = rep(35, 16),
  m_outcome = rep(35, 16),
  v_bo = diag(8.3^2, 2),
  p_pref = rep(1/4, 4),
  p_alloc = matrix(0.25, 4, 4, dimnames = list(int = 1:4, pref = 1:4)),
  kappa_sup = 0.95,
  kappa_act = (1 - kappa_sup)/3,
  brar = FALSE,
  adjust_baseline = FALSE,
  M0 = rep(0, 16 + adjust_baseline),
  S0 = diag(c(100^2, rep(10, 6), rep(1, 9))),
  A0 = 0.01,
  B0 = 0.01,
  drop_arms = FALSE,
  fix_ctr = NULL,
  verbose = FALSE,
  ...
)

Arguments

n_seq

The sample size at which analysis occurs

n_delay

The number with delayed outcome

m_baseline

The baseline response on ordinal scale

m_outcome

The outcome response on ordinal scale

v_bo

The correlation between baseline and outcome measurement

p_pref

The distribution of preferences in the population

p_alloc

The allocation probability to each arm conditional on preference

kappa_sup

Threshold for superiority

kappa_act

Threshold for remaining active

brar

Use RAR?

adjust_baseline

Include the baseline measurement in the model

M0

Prior mean

S0

Prior variance

A0

Prior scale for variance

B0

Prior shape for variance

drop_arms

Allow dropping of arms?

fix_ctr

Fixed allocation to control

verbose

Be chatty


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