Movatterモバイル変換


[0]ホーム

URL:


Conditional error spending functions

Introduction

We describe conditional error spending functions for group sequentialdesigns. These functions are used to calculate conditional errorspending boundaries for group sequential designs using spendingfunctions proposed byXi and Gallo (2019).Note that for all spending functions, for\(t>1\) we define the spending function asif\(t = 1\). For\(\gamma \in [0, 1]\), we define

\[z_\gamma = \Phi^{-1}(1 - \gamma)\]

where\(\Phi\) is the standardnormal cumulative distribution function.

There are 3 spending functions proposed byXiand Gallo (2019), which we will refer to as Method 1(sfXG1()), Method 2 (sfXG2()), and Method 3(sfXG3()). When there is a single interim analysis,conditional error from Method 1 is almost exactly the same as theparameter\(\gamma\) but it allows anarrower range of\(\gamma\). Method 2provides less accurate approximation but allows a wider range of\(\gamma\). Method 3 was proposed toapproximate Pocock bounds with equal bounds on the Z-scale. We replicatespending function bounds ofXi and Gallo(2019) along with corresponding conditional error computationsbelow. We also compare results to other commonly used spendingfunctions.

Implementation in gsDesign

library(gsDesign)library(tibble)library(dplyr)library(gt)

Method 1

For\(\gamma \in [0.5, 1)\), thespending function is defined as

\[\alpha_\gamma(t) = 2 - 2\times \Phi\left(\frac{z_{\alpha/2} -z_\gamma\sqrt{1-t}}{\sqrt t} \right).\]

Recalling the range\(\gamma \in [0.5,1)\), we plot this spending function for\(\gamma = 0.5, 0.6, 0.75, 0.9\).

pts<-seq(0,1.2,0.01)pal<-palette()
plot(  pts,sfXG1(0.025, pts,0.5)$spend,type ="l",col = pal[1],xlab ="t",ylab ="Spending",main ="Xi-Gallo, Method 1")lines(pts,sfXG1(0.025, pts,0.6)$spend,col = pal[2])lines(pts,sfXG1(0.025, pts,0.75)$spend,col = pal[3])lines(pts,sfXG1(0.025, pts,0.9)$spend,col = pal[4])legend("topleft",legend =c("gamma=0.5","gamma=0.6","gamma=0.75","gamma=0.9"),col = pal[1:4],lty =1)

Method 2

For\(\gamma \in [1 - \Phi(z_{\alpha/2}/2),1)\), the spending function for Method 2 is defined as

\[\alpha_\gamma(t)= 2 - 2\times \Phi\left(\frac{z_{\alpha/2} -z_\gamma(1-t)}{\sqrt t} \right)\]

For\(\alpha=0.025\), we restrict\(\gamma\) to [0.131, 1) and plot thespending function for\(\gamma = 0.14, 0.25,0.5, 0.75, 0.9\).

plot(  pts,sfXG2(0.025, pts,0.14)$spend,type ="l",col = pal[1],xlab ="t",ylab ="Spending",main ="Xi-Gallo, Method 2")lines(pts,sfXG2(0.025, pts,0.25)$spend,col = pal[2])lines(pts,sfXG2(0.025, pts,0.5)$spend,col = pal[3])lines(pts,sfXG2(0.025, pts,0.75)$spend,col = pal[4])lines(pts,sfXG2(0.025, pts,0.9)$spend,col = pal[5])legend("topleft",legend =c("gamma=0.14","gamma=0.25","gamma=0.5","gamma=0.75","gamma=0.9"),col = pal[1:5],lty =1)

Method 3

For\(\gamma \in (\alpha/2, 1)\)

\[\alpha_\gamma(t)= 2 - 2\times \Phi\left(\frac{z_{\alpha/2} -z_\gamma(1-\sqrt t)}{\sqrt t} \right).\]

For\(\alpha=0.025\), we restrict\(\gamma\) to\((0.0125, 1)\) and plot the spendingfunction for\(\gamma = 0.013, 0.02, 0.05,0.1, 0.25, 0.5, 0.75, 0.9\).

plot(  pts,sfXG3(0.025, pts,0.013)$spend,type ="l",col = pal[1],xlab ="t",ylab ="Spending",main ="Xi-Gallo, Method 3")lines(pts,sfXG3(0.025, pts,0.02)$spend,col = pal[2])lines(pts,sfXG3(0.025, pts,0.05)$spend,col = pal[3])lines(pts,sfXG3(0.025, pts,0.1)$spend,col = pal[4])lines(pts,sfXG3(0.025, pts,0.25)$spend,col = pal[5])lines(pts,sfXG3(0.025, pts,0.5)$spend,col = pal[6])lines(pts,sfXG3(0.025, pts,0.75)$spend,col = pal[7])lines(pts,sfXG3(0.025, pts,0.9)$spend,col = pal[8])legend("bottomright",legend =c("gamma=0.013","gamma=0.02","gamma=0.05","gamma=0.1","gamma=0.25","gamma=0.5","gamma=0.75","gamma=0.9"  ),col = pal[1:8],lty =1)

Replicating published examples

We replicate spending function bounds ofXiand Gallo (2019) along with corresponding conditional errorcomputations. We have two utility functions. Transposing a tibble and acustom function to compute conditional error.

# Custom function to transpose while preserving names# From https://stackoverflow.com/questions/42790219/how-do-i-transpose-a-tibble-in-rtranspose_df<-function(df) {  t_df<- data.table::transpose(df)colnames(t_df)<-rownames(df)rownames(t_df)<-colnames(df)  t_df<- t_df%>%    tibble::rownames_to_column(.data = .)%>%    tibble::as_tibble(.)return(t_df)}
ce<-function(x) {  k<- x$k  ce<-c(gsCPz(z = x$upper$bound[1:(k-1)],i =1:(k-1),x = x,theta =0),NA)  t<- x$timing  ce_simple<-c(pnorm((last(x$upper$bound)- x$upper$bound[1:(k-1)]*sqrt(t[1:(k-1)]))/sqrt(1- t[1:(k-1)]),lower.tail =FALSE  ),NA)  Analysis<-1:k  y<-tibble(# Analysis = Analysis,Z = x$upper$bound,"CE simple"= ce_simple,CE = ce  )return(y)}

Method 1

The conditional error spending functions ofXiand Gallo (2019) for Method 1 and Method 2 are designed to deriveinterim efficacy bounds with conditional error approximately equal tothe spending function parameter\(\gamma\). The conditional probability ofcrossing the final bound\(u_K\) givenan interim result\(Z_k=u_k\) atanalysis\(k<K\) under theassumption of no treatment effect is

\[p_0(Z_K\ge u_K|Z_k=u_k) = 1 - \Phi\left(\frac{u_K - u_k\sqrtt}{\sqrt{1-t}}\right).\]

Conditional rejection probabilities accounting for all futureanalyses as well as under any assumed treatment effect are explainedfurther in thegsDesigntechnical manual. We will see that where there are future interimanalyses below, the conditional error for crossing at least one futureefficacy bound is substantially greater than the simple conditionalerror ignoring future interims.

We will compare the Method 1 conditional error spending functions ofXi and Gallo (2019) with O’Brien-Flemingbounds (sfu = "OF"), exponential spending(sfu = sfExponential), and the Lan-DeMets spending functionto approximate O’Brien-Fleming bounds (sfu = sfLDOF). TheO’Brien-Fleming bounds are specifically known to the 0.5 (simple)conditional error as seen in the table below. The exponential spendingfunction provides the closest approximation of O’Brien-Fleming boundswith a parameter of 0.76; this was suggested previously byAnderson and Clark (2010). The other Method 1spending functions generally have higher than the targeted simpleconditional error; thus, if you wish to use a particular conditionalerror at bounds, it may be better to see if a smaller\(\gamma\) than the targeted conditionalerror provides a better match.

xOF<-gsDesign(k =4,test.type =1,sfu ="OF")xLDOF<-gsDesign(k =4,test.type =1,sfu = sfLDOF)xExp<-gsDesign(k =4,test.type =1,sfu = sfExponential,sfupar =0.76)x1.8<-gsDesign(k =4,test.type =1,sfu = sfXG1,sfupar =0.8)x1.7<-gsDesign(k =4,test.type =1,sfu = sfXG1,sfupar =0.7)x1.6<-gsDesign(k =4,test.type =1,sfu = sfXG1,sfupar =0.6)x1.5<-gsDesign(k =4,test.type =1,sfu = sfXG1,sfupar =0.5)xx<-rbind(transpose_df(ce(xOF))%>%mutate(gamma ="O'Brien-Fleming"),transpose_df(ce(xExp))%>%mutate(gamma ="Exponential, nu=0.76 to Approximate O'Brien-Fleming"),transpose_df(ce(xLDOF))%>%mutate(gamma ="Lan-DeMets to Approximate O'Brien-Fleming"),transpose_df(ce(x1.5))%>%mutate(gamma ="gamma = 0.5"),transpose_df(ce(x1.6))%>%mutate(gamma ="gamma = 0.6"),transpose_df(ce(x1.7))%>%mutate(gamma ="gamma = 0.7"),transpose_df(ce(x1.8))%>%mutate(gamma ="gamma = 0.8"))xx%>%gt(groupname_col ="gamma")%>%tab_spanner(label ="Analysis",columns =2:5)%>%fmt_number(columns =2:5,decimals =3)%>%tab_options(data_row.padding =px(1))%>%tab_header(title ="Xi-Gallo, Method 1 Spending Function",subtitle ="Conditional Error Spending Functions"  )%>%tab_footnote(footnote ="Conditional Error not accounting for future interim bounds.",locations =cells_stub(rows =seq(2,20,3))  )%>%tab_footnote(footnote ="CE = Conditional Error accounting for all analyses.",locations =cells_stub(rows =seq(3,21,3))  )
Xi-Gallo, Method 1 Spending Function
Conditional Error Spending Functions
Analysis
1234
O'Brien-Fleming
Z4.0492.8632.3372.024
1 CE simple0.5000.5000.500NA
2 CE0.6870.6250.500NA
Exponential, nu=0.76 to Approximate O'Brien-Fleming
Z4.0522.8902.3462.020
1 CE simple0.5020.5130.509NA
2 CE0.6820.6360.509NA
Lan-DeMets to Approximate O'Brien-Fleming
Z4.3332.9632.3592.014
1 CE simple0.5700.5460.523NA
2 CE0.7470.6680.523NA
gamma = 0.5
Z4.3332.9632.3592.014
1 CE simple0.5700.5460.523NA
2 CE0.7470.6680.523NA
gamma = 0.6
Z4.7843.2302.5081.983
1 CE simple0.6820.6650.647NA
2 CE0.8040.7490.647NA
gamma = 0.7
Z5.2653.5142.6711.969
1 CE simple0.7780.7670.754NA
2 CE0.8580.8210.754NA
gamma = 0.8
Z5.8263.8452.8631.963
1 CE simple0.8640.8570.849NA
2 CE0.9080.8870.849NA
1 Conditional Error not accounting for future interim bounds.
2 CE = Conditional Error accounting for all analyses.

Method 2

Method 2 provides a wider range of\(\gamma\) values targeting conditional errorat bounds. Again, choice of\(\gamma\)to get the targeted conditional error may be worth some evaluation.

x1.8<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.8)x1.7<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.7)x1.6<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.6)x1.5<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.5)x1.4<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.4)x1.3<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.3)x1.2<-gsDesign(k =4,test.type =1,sfu = sfXG2,sfupar =0.2)xx<-rbind(transpose_df(ce(x1.2))%>%mutate(gamma ="gamma = 0.2"),transpose_df(ce(x1.3))%>%mutate(gamma ="gamma = 0.3"),transpose_df(ce(x1.4))%>%mutate(gamma ="gamma = 0.4"),transpose_df(ce(x1.5))%>%mutate(gamma ="gamma = 0.5"),transpose_df(ce(x1.6))%>%mutate(gamma ="gamma = 0.6"),transpose_df(ce(x1.7))%>%mutate(gamma ="gamma = 0.7"),transpose_df(ce(x1.8))%>%mutate(gamma ="gamma = 0.8"))xx%>%gt(groupname_col ="gamma")%>%tab_spanner(label ="Analysis",columns =2:5)%>%fmt_number(columns =2:5,decimals =3)%>%tab_options(data_row.padding =px(1))%>%tab_footnote(footnote ="Conditional Error not accounting for future interim bounds.",locations =cells_stub(rows =seq(2,20,3))  )%>%tab_footnote(footnote ="CE = Conditional Error accounting for all analyses.",locations =cells_stub(rows =seq(3,21,3))  )%>%tab_header(title ="Xi-Gallo, Method 2 Spending Function",subtitle ="Conditional Error Spending Functions"  )
Xi-Gallo, Method 2 Spending Function
Conditional Error Spending Functions
Analysis
1234
gamma = 0.2
Z3.0162.3502.2082.224
1 CE simple0.2040.2130.267NA
2 CE0.4750.3680.267NA
gamma = 0.3
Z3.5162.5742.2392.097
1 CE simple0.3480.3480.376NA
2 CE0.5910.4980.376NA
gamma = 0.4
Z3.9402.7742.2952.044
1 CE simple0.4660.4540.455NA
2 CE0.6770.5920.455NA
gamma = 0.5
Z4.3332.9632.3592.014
1 CE simple0.5700.5460.523NA
2 CE0.7470.6680.523NA
gamma = 0.6
Z4.7243.1522.4291.995
1 CE simple0.6640.6290.586NA
2 CE0.8070.7340.586NA
gamma = 0.7
Z5.1413.3532.5091.982
1 CE simple0.7510.7090.648NA
2 CE0.8610.7950.648NA
gamma = 0.8
Z5.6273.5882.6041.973
1 CE simple0.8340.7880.714NA
2 CE0.9090.8530.714NA
1 Conditional Error not accounting for future interim bounds.
2 CE = Conditional Error accounting for all analyses.

Method 3

Method 3 spending functions are designed to approximate Pocock boundswith equal bounds on the Z-scale. Two common approximations used forthis is theHwang, Shih, and De Cani(1990) spending function with\(\gamma= 1\)

\[\alpha_{HSD}(t, \gamma) = \alpha\frac{1-e^{-\gamma t}}{1 - e^{-\gamma}}.\]

and theLan and DeMets (1983) spendingfunction to approximate Pocock bounds

\[\alpha_{LDP}(t) = \alpha \log(1 +(e -1)t).\]

We compare these methods in the following table. While the\(\gamma = 0.025\) conditional error spendingbounds are close to the targeted Pocock bounds, the\(\gamma = 0.05\) conditional error spendingbound is substantially higher than the targeted value at the firstinterim. The traditional Lan-DeMets and Hwang-Shih-DeCani approximationsare quite good approximations of the Pocock bounds. The one number notreproduced fromXi and Gallo (2019) is theconditional error at the first analysis for\(\gamma = 0.05\); while here we havecomputed 0.132, in the paper this value was 0.133. There are differencesin the computation algorithms that may account for this difference. Themethod used in gsDesign is from Chapter 19 ofJennison and Turnbull (2000), specificallydesigned for numerical integration for group sequential trials. Themethod used inXi and Gallo (2019) is amore general method approximating multivariate normal probabilities.

xPocock<-gsDesign(k =4,test.type =1,sfu ="Pocock")xLDPocock<-gsDesign(k =4,test.type =1,sfu = sfLDPocock)xHSD1<-gsDesign(k =4,test.type =1,sfu = sfHSD,sfupar =1)x3.025<-gsDesign(k =4,test.type =1,sfu = sfXG3,sfupar =0.025)x3.05<-gsDesign(k =4,test.type =1,sfu = sfXG3,sfupar =0.05)xx<-rbind(transpose_df(ce(xPocock))%>%mutate(gamma ="Pocock"),transpose_df(ce(xLDPocock))%>%mutate(gamma ="Lan-DeMets to Approximate Pocock"),transpose_df(ce(xHSD1))%>%mutate(gamma ="Hwang-Shih-DeCani, gamma = 1"),transpose_df(ce(x3.025))%>%mutate(gamma ="gamma = 0.025"),transpose_df(ce(x3.05))%>%mutate(gamma ="gamma = 0.05 "))xx%>%gt(groupname_col ="gamma")%>%tab_spanner(label ="Analysis",columns =2:5)%>%fmt_number(columns =2:5,decimals =3)%>%tab_options(data_row.padding =px(1))%>%tab_footnote(footnote ="Conditional Error not accounting for future interim bounds.",locations =cells_stub(rows =seq(2,11,3))  )%>%tab_footnote(footnote ="CE = Conditional Error accounting for all analyses.",locations =cells_stub(rows =seq(3,12,3))  )%>%tab_header(title ="Xi-Gallo, Method 3 Spending Function",subtitle ="Conditional Error Spending Functions"  )
Xi-Gallo, Method 3 Spending Function
Conditional Error Spending Functions
Analysis
1234
Pocock
Z2.3612.3612.3612.361
1 CE simple0.0860.1640.263NA
2 CE0.2280.2830.263NA
Lan-DeMets to Approximate Pocock
Z2.3682.3682.3582.350
1 CE simple0.0890.1700.269NA
2 CE0.2300.2890.269NA
Hwang-Shih-DeCani, gamma = 1
Z2.3762.3572.3502.357
1 CE simple0.0880.1640.260NA
2 CE0.2350.2860.260NA
gamma = 0.025
Z2.2692.3392.4222.483
1 CE simple0.0600.1200.220NA
2 CE0.1960.2300.220NA
gamma = 0.05
Z2.6092.3302.2812.270
CE simple0.1320.1890.278NA
CE0.3280.3180.278NA
1 Conditional Error not accounting for future interim bounds.
2 CE = Conditional Error accounting for all analyses.

Summary

Xi and Gallo (2019) proposedconditional error spending functions for group sequential designs areimplemented in the gsDesign package. When there is a single interimanalysis, conditional error from Method 1 is almost exactly the same asthe parameter\(\gamma\) but it allowsa narrower range of\(\gamma\). Method2 provides less accurate approximation but allows a wider range of\(\gamma\). Using\(\gamma = 0.5\) replicates the Lan-DeMetsspending function to approximate O’Brien-Fleming bounds. An exponentialspending function provides a possibly better approximation ofO’Brien-Fleming bounds. Simply selecting a smaller\(\gamma\) than the targeted conditionalerror may provide a better match for the targeted bounds. While Method 3provides a reasonable approximation of a Pocock bound with equal boundson the Z-scale, its stated objective, traditional approximations ofPocock bounds with the Lan-DeMets and Hwang-Shih-DeCani spendingfunctions may be slightly better.

Results duplicated findings from the original paper.

References

Anderson, K. M., and J. Clark. 2010.“Group Sequential Design:Selecting Appropriate Bounds.”Journal of ClinicalOncology 28 (15_suppl): e13159–59.
Hwang, Irving K, Weichung J Shih, and John S De Cani. 1990.“GroupSequential Designs Using a Family of Type i Error Probability SpendingFunctions.”Statistics in Medicine 9 (12): 1439–45.
Jennison, Christopher, and Bruce W. Turnbull. 2000.Group SequentialMethods with Applications to Clinical Trials. Boca Raton, FL:Chapman; Hall/CRC.
Lan, K. K. G., and David L. DeMets. 1983.“Discrete SequentialBoundaries for Clinical Trials.”Biometrika 70: 659–63.
Xi, Dong, and Paul Gallo. 2019.“An Additive Boundary for GroupSequential Designs with Connection to Conditional Error.”Statistics in Medicine 38 (23): 4656–69.

[8]ページ先頭

©2009-2025 Movatter.jp