req_resp_rct {earlygating}R Documentation

Required Responders for GO decision RCT

Description

Function for calculating the minimum required number of responders in the experimental group to make a GO decision in Settings 3 and 4.

Usage

req_resp_rct(
  N_c,
  N_e,
  delta,
  confidence,
  e_a = 0.5,
  e_b = 0.5,
  c_a = 0.5,
  c_b = 0.5,
  h_a = 0.5,
  h_b = 0.5,
  RR_h = NULL,
  N_h = NULL,
  w = NULL,
  plot = T
)

Arguments

N_c

Sample Size in the control group.

N_e

Sample Size in the experimental group.

delta

Required superiority to make a "GO" decision. Corresponds to δ\delta.

confidence

Required confidence to make "GO" decision. Corresponds to γ\gamma.

e_a

Alpha parameter of Beta Prior Distribution for the experimental response rate. Corresponds to αe\alpha_e. Default is 12\frac{1}{2}.

e_b

Beta parameter of Beta Prior Distribution for the experimental response rate. Corresponds to βe\beta_e. Default is 12\frac{1}{2}.

c_a

Alpha parameter of Beta Prior Distribution for the control response rate. Corresponds to αc\alpha_c. Default is 12\frac{1}{2}.

c_b

Beta parameter of Beta Prior Distribution for the control response rate. Corresponds to βc\beta_c. Default is 12\frac{1}{2}.

h_a

Alpha parameter of Beta Prior Distribution for the historical control response rate. Corresponds to αh\alpha_h. Only needs to be specified, if RR_h, N_h and w are also specified. Default is 12\frac{1}{2}.

h_b

Beta parameter of Beta Prior Distribution for the historical control response rate. Corresponds to βh\beta_h. Only needs to be specified, if RR_h, N_h and w are also specified. Default is 12\frac{1}{2}.

RR_h

Historical control response rate. Corresponds to php_h. If specified together with N_h and w, function will use setting 4 from pdf.

N_h

Historical control sample size. Corresponds to nhn_h. If specified together with RR_h and w, function will use setting 4 from pdf.

w

Level of dynmaic borrowing. Corresponds to ww.

plot

Plots yes or no. Default is TRUE.

Value

Matrix containing pairs of successes in control group and respective required successes in experimental group.

Examples


# Setting 3
req_resp_rct(
  N_c = 25, N_e = 25,
  delta = 0.08, confidence = 0.6
)

# Setting 4
req_resp_rct(
  N_c = 25, N_e = 25,
  delta = 0.08, confidence = 0.6,
  RR_h = 0.5, N_h = 50, w = 0.3
)


[Package earlygating version 1.1 Index]