sim_trial: Simulate Bayesian two-arm trial with early termination for...

Description Usage Arguments Details Value

Description

Hypothesis: H_0: p_1 > p_2 + d H_1: p_1 < p_2 + d

Usage

1
2
3
sim_trial(sim_id = 1, p1tru = 0.1, p2tru = 0.1, delta = 0,
  n1int = seq(100, 500, 50), n2int = seq(100, 500, 50), a1 = 1,
  b1 = 1, a2 = 1, b2 = 1, post_method = "exact")

Arguments

sim_id

The simulation ID reference number

p1tru

True value for response rate arm 1

p2tru

True value for response rate arm 2

delta

Relative difference of interest (X - Y > delta)

n1int

Individuals with follow-up at each interim arm 1

n2int

Individuals with follow-up at each interim arm 2

a1

Prior parameter arm 1

b1

Prior parameter arm 1

a2

Prior parameter arm 2

b2

Prior parameter arm 2

post_method

What method to use for estimating the Beta inequality. One of 'exact', 'approx' or 'sim'.

Details

Terimnal decision rule: Pr(p_1 < p_2 + d | x_i) > k_hi => H_1 Pr(p_1 < p_2 + d | x_i) < k_lo => H_0 Otherwise => inconclusive

Interim decision rule: Pr(p_1 < p_2 + d | x_i) > k_hi => H_1 Pr(p_1 < p_2 + d | x_i) < k_lo => H_0

OR

PPoS > q_hi => expect success => H_1 PPoS < q_lo => futile => H_0

Otherwise => continue to k + 1

Value

A data.table of the simulated trial containing one row for each interim analysis.


jatotterdell/optimum documentation built on May 29, 2019, 1:24 p.m.