Skip to content

Generalize gs_bound_summary for supporting multiple alpha #522

Closed
@LittleBeannie

Description

@LittleBeannie

Introduction

The gsDesign::gsBoundSummary function supports efficacy bounds under multiple alpha levels. Below is a demonstration example.

The original design x is based on an alpha of 0.0125. When we summarize the design using the gsBoundSummary function, it provides us with two columns: efficacy and futility. Both of these columns are generated under the original alpha of 0.0125.

library(gsDesign)
x <- gsSurv(lambdaC = .2, hr = .5, eta = .1, T = 2, minfup = 1.5, alpha = 0.0125)
gsBoundSummary(x)

    Analysis              Value Efficacy Futility
   IA 1: 33%                  Z   3.2153  -0.0741
      N: 540        p (1-sided)   0.0007   0.5295
  Events: 38       ~HR at bound   0.3509   1.0244
    Month: 1   P(Cross) if HR=1   0.0007   0.4705
             P(Cross) if HR=0.5   0.1324   0.0148
   IA 2: 67%                  Z   2.7838   1.1739
      N: 540        p (1-sided)   0.0027   0.1202
  Events: 76       ~HR at bound   0.5267   0.7631
    Month: 1   P(Cross) if HR=1   0.0031   0.8857
             P(Cross) if HR=0.5   0.5790   0.0437
       Final                  Z   2.2837   2.2837
      N: 540        p (1-sided)   0.0112   0.0112
 Events: 114       ~HR at bound   0.6509   0.6509
    Month: 2   P(Cross) if HR=1   0.0116   0.9884
             P(Cross) if HR=0.5   0.9000   0.1000

We can also summarize the above design using alternative alpha values, such as 0.025 and 0.05, by directly inputting these values into the alpha = ... argument in the gsBoundSummary function. This will yield multiple efficacy columns, each corresponding to the specified alpha levels. In contrast, there will be only one futility column, which is based on the original alpha of 0.0125.

gsBoundSummary(x, alpha = c(0.025, 0.05))

    Analysis              Value α=0.0125 α=0.025 α=0.05 Futility
   IA 1: 33%                  Z   3.2153  3.0107 2.7936  -0.0741
      N: 540        p (1-sided)   0.0007  0.0013 0.0026   0.5295
  Events: 38       ~HR at bound   0.3509  0.3751 0.4026   1.0244
    Month: 1   P(Cross) if HR=1   0.0007  0.0013 0.0026   0.4705
             P(Cross) if HR=0.5   0.1324  0.1813 0.2441   0.0148
   IA 2: 67%                  Z   2.7838  2.5465 2.2890   1.1739
      N: 540        p (1-sided)   0.0027  0.0054 0.0110   0.1202
  Events: 76       ~HR at bound   0.5267  0.5563 0.5903   0.7631
    Month: 1   P(Cross) if HR=1   0.0031  0.0062 0.0124   0.8857
             P(Cross) if HR=0.5   0.5790  0.6689 0.7559   0.0437
       Final                  Z   2.2837  1.9992 1.6799   2.2837
      N: 540        p (1-sided)   0.0112  0.0228 0.0465   0.0112
 Events: 114       ~HR at bound   0.6509  0.6866 0.7291   0.6509
    Month: 2   P(Cross) if HR=1   0.0116  0.0219 0.0393   0.9884
             P(Cross) if HR=0.5   0.9000  0.9295 0.9466   0.1000

Objective

In gsDesign2, we will enhance the gs_bound_summary function to provide similar functionality as the gsBoundSummary function described above. Specifically, when we execute the following code, we will obtain a table with three efficacy columns (α = 0.0125, α = 0.025, α = 0.05) and one futility column based on the original alpha of 0.0125.

x <- gs_design_ahr(analysis_time = 1:3*12, alpha = 0.0125) 
gs_bound_summary(x, alpha = c(0.025, 0.05))

Approach to generate an "Efficacy" column under an alternative alpha

The original design is typically generated using gs_design_ahr or gs_power_ahr. Without loss of generality, let's assume the original design is created with gs_design_ahr using an original alpha of 0.0125, as shown below:

x <- gs_design_ahr(alpha = 0.0125, ...)

To generate another "Efficacy" column under an alpha of 0.025, we can run the following code:

x_another_alpha <- gs_update_ahr(x = x, alpha = 0.025)

The output of gs_update_ahr shares the same format as gs_design_ahr. By tidying x_another_alpha, we can obtain the new "Efficacy" column at IA1 as follows:

  • The "Z" value is from x_another_alpha$bound |> filter(bound == “upper”, analysis == 1) |> select(z).
  • The "p(1-sided)" value is from x_another_alpha$bound |> filter(bound == “upper”, analysis == 1) |> select(nominal p)
  • The "~HR at bound" value is from x_another_alpha$bound |> filter(bound == “upper”, analysis == 1) |> select(~hr at bound )
  • The "P(Cross) if HR = 1" value is from x_another_alpha$bound |> filter(bound == “upper”, analysis == 1) |> select(probability0).
  • The "P(Cross) if HR = 0.6" value is from x_another_alpha$bound |> filter(bound == “upper”, analysis == 1) |> select(probability)

For subsequent analyses (IA2, IA3, ..., FA), please replace analysis == 1 with analysis == 2, analysis == 3, etc. If there are multiple alternative alpha values, please repeat the above steps to obtain additional "Efficacy" columns.

One minor issue I would like to bring to your attention: when the original design is generated using gs_power_ahr, the original alpha can be retrieved from x$input$upar$total_spend. The rest is the same as above.

@jdblischak, Please let me know if you have any questions regarding the above! There are some technical details included, and I would be happy to kick things off by writing the first draft of the gs_bound_summary.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions