Skip to contents

Test 1

Call with defaults.

x1 <- gs_design_ahr()
x2 <- gs_design_ahr_()
version samplesize events time theta Z_upper prob_upper AHR info info0
1
new 476.0087 291.9497 36 0.3807634 1.959964 0.9 0.6833395 71.70066 72.98742
old 476.0087 291.9497 36 0.3807634 1.959964 0.9 0.6833395 71.70066 72.98742

Test 2

Single analysis.

x1 <- gs_design_ahr(analysisTimes = 40)
x2 <- gs_design_ahr_(analysisTimes = 40)
version samplesize events time theta Z_upper prob_upper AHR info info0
1
new 427.7175 279.7264 40 0.3888515 1.959964 0.9 0.6778349 68.82523 69.9316
old 427.7175 279.7264 40 0.3888515 1.959964 0.9 0.6778349 68.82523 69.9316

Test 3

Multiple analysisTimes.

x1 <- gs_design_ahr(analysisTimes = c(12, 24, 36))
x2 <- gs_design_ahr_(analysisTimes = c(12, 24, 36))
version samplesize events time theta Z_upper Z_lower prob_upper prob_lower AHR info info0
1
new 419.0911 95.01497 12 0.2097907 4.332634 -1.281552 0.0005072859 0.0110825711 0.8107539 23.41475 23.75374
old 419.0911 95.01497 12 0.2097907 4.332634 -1.281552 0.0005072859 0.0005072859 0.8107539 23.41475 23.75374
2
new 502.9093 228.49620 24 0.3352538 2.339816 -Inf 0.5657878478 0.0110825711 0.7151566 55.87540 57.12405
old 502.9093 228.49620 24 0.3352538 2.339816 -Inf 0.5657878478 0.5657878478 0.7151566 55.87540 57.12405
3
new 502.9093 308.44863 36 0.3807634 2.011793 -Inf 0.9000000000 0.0110825711 0.6833395 75.75268 77.11216
old 502.9093 308.44863 36 0.3807634 2.011793 -Inf 0.9000000000 0.9000000000 0.6833395 75.75268 77.11216

Test 4

Specified information fraction

x1 <- gs_design_ahr(IF = c(.25, .75, 1), analysisTimes = 36)
x2 <- gs_design_ahr_(IF = c(.25, .75, 1), analysisTimes = 36)
version samplesize events time theta Z_upper Z_lower prob_upper prob_lower AHR info info0
1
new 371.4211 78.26886 10.73156 0.1948927 4.332634 -1.281552 0.0002821398 0.0165907170 0.8229230 19.31654 19.56722
old 371.4211 78.26886 10.73156 0.1948927 4.332634 -1.281552 0.0002821398 0.0002821398 0.8229230 19.31654 19.56722
2
new 510.4533 234.80664 24.35467 0.3374094 2.339816 -Inf 0.5847701924 0.0165907170 0.7136166 57.42103 58.70166
old 510.4533 234.80664 24.35467 0.3374094 2.339816 -Inf 0.5847701924 0.5847701924 0.7136166 57.42103 58.70166
3
new 510.4533 313.07554 36.00000 0.3807634 2.011793 -Inf 0.8999999998 0.0165907170 0.6833395 76.88901 78.26888
old 510.4533 313.07554 36.00000 0.3807634 2.011793 -Inf 0.8999999998 0.8999999998 0.6833395 76.88901 78.26888

Test 5

Multiple analysis times & IF and driven by times.

x1 <- gs_design_ahr(IF = c(.25, .75, 1), analysisTimes = c(12, 25, 36))
x2 <- gs_design_ahr_(IF = c(.25, .75, 1), analysisTimes = c(12, 25, 36))
version samplesize events time theta Z_upper Z_lower prob_upper prob_lower AHR info info0
1
new 419.0108 94.99677 12 0.2097907 4.332634 -1.281552 0.0005071107 0.0110854068 0.8107539 23.41026 23.74919
old 419.0108 94.99677 12 0.2097907 4.332634 -1.281552 0.0005071107 0.0005071107 0.8107539 23.41026 23.74919
2
new 502.8130 236.37492 25 0.3411384 2.339816 -Inf 0.5999030103 0.0110854068 0.7109605 57.81055 59.09373
old 502.8130 236.37492 25 0.3411384 2.339816 -Inf 0.5999030103 0.5999030103 0.7109605 57.81055 59.09373
3
new 502.8130 308.38953 36 0.3807634 2.011793 -Inf 0.9000000000 0.0110854068 0.6833395 75.73816 77.09738
old 502.8130 308.38953 36 0.3807634 2.011793 -Inf 0.9000000000 0.9000000000 0.6833395 75.73816 77.09738

Test 6

Multiple analysis times & IF and driven by IF.

x1 <- gs_design_ahr(IF = c(1/3, .8, 1), analysisTimes = c(12, 25, 36))
x2 <- gs_design_ahr_(IF = c(1/3, .8, 1), analysisTimes = c(12, 25, 36))
version samplesize events time theta Z_upper Z_lower prob_upper prob_lower AHR info info0
1
new 439.0663 102.3414 12.52524 0.2155534 4.332634 -1.281552 0.0006449165 0.0092803123 0.8060952 25.20656 25.58534
old 439.0663 102.3414 12.52524 0.2155534 4.332634 -1.281552 0.0006449165 0.0006449165 0.8060952 25.20656 25.58534
2
new 500.5867 245.6191 26.35614 0.3482478 2.339816 -Inf 0.6401942065 0.0092803123 0.7059240 60.08981 61.40476
old 500.5867 245.6191 26.35614 0.3482478 2.339816 -Inf 0.6401942065 0.6401942065 0.7059240 60.08981 61.40476
3
new 500.5867 307.0241 36.00000 0.3807634 2.011793 -Inf 0.9000000000 0.0092803123 0.6833395 75.40282 76.75602
old 500.5867 307.0241 36.00000 0.3807634 2.011793 -Inf 0.9000000000 0.9000000000 0.6833395 75.40282 76.75602

Test 7

2-sided symmetric design with O’Brien-Fleming spending

x1 <- gs_design_ahr(analysisTimes = c(12, 24, 36), binding = TRUE,
                    upper = gs_spending_bound,
                    upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
                    lower = gs_spending_bound,
                    lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
                    h1_spending = FALSE)
x2 <- gs_design_ahr_(analysisTimes = c(12, 24, 36), binding = TRUE,
                    upper = gs_spending_bound,
                    upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
                    lower = gs_spending_bound,
                    lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
                    h1_spending = FALSE)
version samplesize events time theta Z_upper Z_lower prob_upper prob_lower AHR info info0
1
new 411.7575 93.35231 12 0.2097907 3.872763 -3.872763 0.002264191 6.134000e-07 0.8107539 23.00501 23.33808
old 411.7575 93.35231 12 0.2097907 3.872763 -3.872763 0.002264191 2.264191e-03 0.8107539 23.00501 23.33808
2
new 494.1089 224.49775 24 0.3352538 2.357870 -2.357870 0.550377662 1.246332e-06 0.7151566 54.89764 56.12444
old 494.1089 224.49775 24 0.3352538 2.357870 -2.357870 0.550377662 5.503777e-01 0.7151566 54.89764 56.12444
3
new 494.1089 303.05110 36 0.3807634 2.009598 -2.009598 0.900000000 1.282767e-06 0.6833395 74.42709 75.76278
old 494.1089 303.05110 36 0.3807634 2.009598 -2.009598 0.900000000 9.000000e-01 0.6833395 74.42709 75.76278

Test 8

Pocock lower spending under H1 (NPH).

x1 <- gs_design_ahr(analysisTimes = c(12, 24, 36), binding = TRUE,
                    upper = gs_spending_bound,
                    upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
                    lower = gs_spending_bound,
                    lpar = list(sf = gsDesign::sfLDPocock, total_spend = 0.1, param = NULL, timing = NULL),
                    h1_spending = TRUE)

x2 <- gs_design_ahr_(analysisTimes = c(12, 24, 36), binding = TRUE,
                    upper = gs_spending_bound,
                    upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
                    lower = gs_spending_bound,
                    lpar = list(sf = gsDesign::sfLDPocock, total_spend = 0.1, param = NULL, timing = NULL),
                    h1_spending = TRUE)
version samplesize events time theta Z_upper Z_lower prob_upper prob_lower AHR info info0
1
new 494.0903 112.0186 12 0.2097907 3.872763 -0.619037 0.003046084 0.043002964 0.8107539 27.60498 28.00464
old 494.0903 112.0186 12 0.2097907 3.872763 -0.619037 0.003046084 0.003046084 0.8107539 27.60498 28.00464
2
new 592.9084 269.3872 24 0.3352538 2.357383 1.131907 0.637893043 0.082267363 0.7151566 65.87468 67.34679
old 592.9084 269.3872 24 0.3352538 2.357383 1.131907 0.637893043 0.637893043 0.7151566 65.87468 67.34679
3
new 592.9084 363.6476 36 0.3807634 1.977056 1.972917 0.900000005 0.100403556 0.6833395 89.30914 90.91190
old 592.9084 363.6476 36 0.3807634 1.977056 1.972917 0.900000005 0.900000005 0.6833395 89.30914 90.91190