Function for calculating the average operating characteristics of a single arm Bayesian designs for early gating with respect to the historic target.

avg_oc_wr_ph(
  N_e,
  delta,
  delta_power,
  confidence,
  e_a = 0.5,
  e_b = 0.5,
  alpha_c,
  beta_c,
  trues = seq(0, 1, 0.01),
  adapt = 1,
  plot = T,
  legend = T,
  legend.pos = "topleft"
)

Arguments

N_e

Sample Size in the experimental group. Can be either a single value or a vector.

delta

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

delta_power

Superiority, at which decision power will be evaluated. Corresponds to \(\bar{\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 \(\alpha_e\). Default is \(\frac{1}{2}\).

e_b

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

alpha_c

Alpha parameter of Beta Distribution for the control response rate used to calculate average operating characteristics. Corresponds to \(\alpha_c\).

beta_c

Beta parameter of Beta Distribution for the control response rate used to calculate average operating characteristics. Corresponds to \(\beta_c\).

trues

Sequence of true control response rates and experimental response rates, at which the Probability to Go will be computed. Default is seq(0,1,0.01) to ensure continuous plots and accurate results.

adapt

Level of adapting of experimental control rate to account for patient selection bias from phase II to phase III. Corresponds to \(\xi\). Default is 1, so no adapting.

plot

Plots yes or no. Default is TRUE.

legend

Logical; whether or not to include legend in plot. Default is TRUE.

legend.pos

Position of legend. Default is "topleft".

Value

A matrix containing information about the decision power and the decision alpha with respect to p_h.

Examples

avg_oc_wr_ph( N_e = 50, delta = 0.08, delta_power = 0.13, confidence = 0.6, alpha_c = 15, beta_c = 13 )
#> Dec.Alpha Dec.Power p_h #> [1,] 9.900907e-01 0.9900927135 0.00 #> [2,] 9.900907e-01 0.9900927135 0.01 #> [3,] 9.900721e-01 0.9900926731 0.02 #> [4,] 9.900721e-01 0.9900926731 0.03 #> [5,] 9.900232e-01 0.9900925132 0.04 #> [6,] 9.900232e-01 0.9900925132 0.05 #> [7,] 9.899080e-01 0.9900919618 0.06 #> [8,] 9.896603e-01 0.9900902683 0.07 #> [9,] 9.896603e-01 0.9900902683 0.08 #> [10,] 9.891679e-01 0.9900855626 0.09 #> [11,] 9.891679e-01 0.9900855626 0.10 #> [12,] 9.882538e-01 0.9900735851 0.11 #> [13,] 9.882538e-01 0.9900735851 0.12 #> [14,] 9.866556e-01 0.9900453772 0.13 #> [15,] 9.866556e-01 0.9900453772 0.14 #> [16,] 9.840076e-01 0.9899834073 0.15 #> [17,] 9.840076e-01 0.9899834073 0.16 #> [18,] 9.798279e-01 0.9898555434 0.17 #> [19,] 9.798279e-01 0.9898555434 0.18 #> [20,] 9.735157e-01 0.9896063396 0.19 #> [21,] 9.735157e-01 0.9896063396 0.20 #> [22,] 9.643630e-01 0.9891453347 0.21 #> [23,] 9.643630e-01 0.9891453347 0.22 #> [24,] 9.515833e-01 0.9883325069 0.23 #> [25,] 9.515833e-01 0.9883325069 0.24 #> [26,] 9.343585e-01 0.9869616906 0.25 #> [27,] 9.343585e-01 0.9869616906 0.26 #> [28,] 9.119025e-01 0.9847435944 0.27 #> [29,] 9.119025e-01 0.9847435944 0.28 #> [30,] 8.835369e-01 0.9812909261 0.29 #> [31,] 8.835369e-01 0.9812909261 0.30 #> [32,] 8.487727e-01 0.9761088846 0.31 #> [33,] 8.487727e-01 0.9761088846 0.32 #> [34,] 8.073866e-01 0.9685946917 0.33 #> [35,] 8.073866e-01 0.9685946917 0.34 #> [36,] 7.594853e-01 0.9580497281 0.35 #> [37,] 7.594853e-01 0.9580497281 0.36 #> [38,] 7.055442e-01 0.9437070558 0.37 #> [39,] 7.055442e-01 0.9437070558 0.38 #> [40,] 6.464165e-01 0.9247756072 0.39 #> [41,] 6.464165e-01 0.9247756072 0.40 #> [42,] 5.833054e-01 0.9005001809 0.41 #> [43,] 5.833054e-01 0.9005001809 0.42 #> [44,] 5.177014e-01 0.8702338351 0.43 #> [45,] 5.177014e-01 0.8702338351 0.44 #> [46,] 4.512874e-01 0.8335166545 0.45 #> [47,] 4.512874e-01 0.8335166545 0.46 #> [48,] 3.858223e-01 0.7901526316 0.47 #> [49,] 3.858223e-01 0.7901526316 0.48 #> [50,] 3.230129e-01 0.7402749903 0.49 #> [51,] 3.230129e-01 0.7402749903 0.50 #> [52,] 2.643908e-01 0.6843900749 0.51 #> [53,] 2.643908e-01 0.6843900749 0.52 #> [54,] 2.112054e-01 0.6233911804 0.53 #> [55,] 2.112054e-01 0.6233911804 0.54 #> [56,] 1.643465e-01 0.5585364150 0.55 #> [57,] 1.643465e-01 0.5585364150 0.56 #> [58,] 1.243035e-01 0.4913886667 0.57 #> [59,] 1.243035e-01 0.4913886667 0.58 #> [60,] 9.116442e-02 0.4237205058 0.59 #> [61,] 9.116442e-02 0.4237205058 0.60 #> [62,] 6.465316e-02 0.3573917534 0.61 #> [63,] 6.465316e-02 0.3573917534 0.62 #> [64,] 4.419695e-02 0.2942117244 0.63 #> [65,] 4.419695e-02 0.2942117244 0.64 #> [66,] 2.901427e-02 0.2358010726 0.65 #> [67,] 2.901427e-02 0.2358010726 0.66 #> [68,] 1.821059e-02 0.1834691464 0.67 #> [69,] 1.821059e-02 0.1834691464 0.68 #> [70,] 1.086963e-02 0.1381214937 0.69 #> [71,] 1.086963e-02 0.1381214937 0.70 #> [72,] 6.129924e-03 0.1002086608 0.71 #> [73,] 6.129924e-03 0.1002086608 0.72 #> [74,] 3.239859e-03 0.0697221349 0.73 #> [75,] 3.239859e-03 0.0697221349 0.74 #> [76,] 1.588393e-03 0.0462369303 0.75 #> [77,] 1.588393e-03 0.0462369303 0.76 #> [78,] 7.127325e-04 0.0289938942 0.77 #> [79,] 7.127325e-04 0.0289938942 0.78 #> [80,] 2.874714e-04 0.0170093781 0.79 #> [81,] 2.874714e-04 0.0170093781 0.80 #> [82,] 1.016165e-04 0.0091964146 0.81 #> [83,] 1.016165e-04 0.0091964146 0.82 #> [84,] 3.031672e-05 0.0044806104 0.83 #> [85,] 3.031672e-05 0.0044806104 0.84 #> [86,] 7.182208e-06 0.0018958133 0.85 #> [87,] 7.182208e-06 0.0018958133 0.86 #> [88,] 1.205791e-06 0.0006489251 0.87 #> [89,] 1.205791e-06 0.0006489251 0.88 #> [90,] 1.205791e-06 0.0006489251 0.89 #> [91,] 1.080821e-07 0.0001495436 0.90 #> [92,] 1.080821e-07 0.0001495436 0.91 #> [93,] NA NA 0.92 #> [94,] NA NA 0.93 #> [95,] NA NA 0.94 #> [96,] NA NA 0.95 #> [97,] NA NA 0.96 #> [98,] NA NA 0.97 #> [99,] NA NA 0.98 #> [100,] NA NA 0.99 #> [101,] NA NA 1.00