Description Usage Arguments Details Value Author(s) References See Also Examples

`ssrCP()`

adapts 2-stage group sequential designs to 2-stage sample size re-estimation designs based on interim analysis conditional power.
This is a simple case of designs developed by Lehmacher and Wassmer, Biometrics (1999).
The conditional power designs of Bauer and Kohne (1994), Proschan and Hunsberger (199x), Cui, Hung and Wang (199x) and Liu and Chi (), Gao, Ware and Mehta (), and Mehta and Pocock (2011).
Either the estimated treatment effect at the interim analysis or any chosen effect size can be used for sample size re-estimation.
If not done carefully, these designs can be very inefficient. It is probably a good idea to compare any design to a simpler group sequential design; see, for example, Jennison and Turnbull (2003).
The a assumes a small Type I error is included with the interim analysis and that the design is an adaptation from a 2-stage group sequential design Related functions include 3 pre-defined combination test functions (`z2NC`

, `z2Z`

, `z2Fisher`

) that represent the inverse normal combination test (Lehmacher and Wassmer, 1999), the sufficient statistic for the complete data, and Fisher's combination test. `Power.ssrCP`

computes unconditional power for a conditional power design derived by `ssrCP`

.

`condPower`

is a supportive routine that also is interesting in its own right; it computes conditional power of a combination test given an interim test statistic, stage 2 sample size and combindation test statistic.
While the returned data frame should make general plotting easy, the function `plot.ssrCP()`

prints a plot of study sample size by stage 1 outcome with multiple x-axis labels for stage 1 z-value, conditional power, and stage 1 effect size relative to the effect size for which the underlying group sequential design was powered.

1 2 3 4 5 6 7 8 9 10 | ```
ssrCP(z1, theta=NULL, maxinc=2, overrun=0, beta = x$beta, cpadj=c(.5,1-beta),
x=gsDesign(k=2, timing=.5), z2=z2NC,...)
## S3 method for class 'ssrCP'
plot(x, z1ticks=NULL, mar=c(7, 4, 4, 4)+.1,
ylab="Adapted sample size", xlaboffset=-.2, lty=1, col=1,...)
Power.ssrCP(x, theta=NULL, delta=NULL, r=18)
condPower(z1, n2, z2=z2NC, theta=NULL, x=gsDesign(k=2, timing=.5, beta=beta), ...)
z2NC(z1,x,...)
z2Z(z1,x,n2=x$n.I[2]-x$n.I[1],...)
z2Fisher(z1,x,...)
``` |

Arguments for `ssrCP()`

`z1` |
Scalar or vector with interim standardized Z-value(s). Input of multiple values makes it easy to plot the revised sample size as a function of the interim test statistic. |

`theta` |
If |

`maxinc` |
Maximum fold-increase from planned maximum sample size in underlying group sequential design provided in |

`overrun` |
The number of patients enrolled before the interim analysis is completed who are not included in the interim analysis. |

`beta` |
Targeted Type II error (1 - targeted conditional power); used for conditional power in sample size reestimation. |

`cpadj` |
Range of values strictly between 0 and 1 specifying the range of interim conditional power for which sample size re-estimation is to be performed. Outside of this range, the sample size supplied in |

`x` |
A group sequential design with 2 stages ( |

`z2` |
a combination function that returns a test statistic cutoff for the stage 2 test based in the interim test statistic supplied in |

`...` |
Allows passing of arguments that may be needed by the user-supplied function, codez2. In the case of |

Additional arguments for `Power.ssrCP()`

:

`delta` |
Natural parameter values for power calculation; see |

`r` |
Integer value controlling grid for numerical integration as in Jennison and Turnbull (2000);
default is 18, range is 1 to 80.
Larger values provide larger number of grid points and greater accuracy.
Normally |

Additional argument for `z2Z()`

and `condPower`

:

`n2` |
stage 2 sample size to be used in computing sufficient statistic when combining stage 1 and 2 test statistics. |

Additional arguments for `plot.ssrCP()`

are all graphical parameters:

`z1ticks` |
Test statistic values at which tick marks are to be made on x-axis; automatically calculated under default of |

`mar` |
Plot margins; see help for |

`ylab` |
y-axis label |

`xlaboffset` |
offset on x-axis for printing x-axis labels |

`lty` |
line type for stage 2 sample size |

`col` |
line color for stage 2 sample size |

Sample size re-estimation using conditional power and an interim estimate of treatment effect was proposed by several authors in the 1990's (see references below). Statistical testing for these original methods was based on combination tests since Type I error could be inflated by using a sufficient statistic for testing at the end of the trial. Since 2000, more efficient variations of these conditional power designs have been developed. Fully optimized designs have also been derived (Posch et all, 2003, Lokhnygina and Tsiatis, 2008). Some of the later conditional power methods allow use of sufficient statistics for testing (Chen, DeMets and Lan, 2004, Gao, Ware and Mehta, 2008, and Mehta and Pocock, 2011).

The methods considered here are extensions of 2-stage group sequential designs that include both an efficacy and a futility bound at the planned interim analysis. A maximum fold-increase in sample size (`maxinc`

)from the supplied group sequential design (`x`

) is specified by the user, as well as a range of conditional power (`cpadj`

) where sample size should be re-estimated at the interim analysis, 1-the targeted conditional power to be used for sample size re-estimation (`beta`

) and a combination test statistic (`z2`

) to be used for testing at the end of the trial.
The input value `overrun`

represents incremental enrollment not included in the interim analysis that is not included in the analysis; this is used for calculating the required number of patients enrolled to complete the trial.

Whereas most of the methods proposed have been based on using the interim estimated treatment effect size (default for `ssrCP`

), the variable `theta`

allows the user to specify an alternative; Liu and Chi (2001) suggest that using the parameter value for which the trial was originally powered is a good choice.

`ssrCP`

returns a list with the following items:

`x` |
As input. |

`z2fn` |
As input in |

`theta` |
standardize effect size used for conditional power; if |

`maxinc` |
As input. |

`overrun` |
As input. |

`beta` |
As input. |

`cpadj` |
As input. |

`dat` |
A data frame containing the input |

Keaven Anderson keaven\_anderson@merck.

Bauer, Peter and Kohne, F., Evaluation of experiments with adaptive interim analyses, Biometrics, 50:1029-1041, 1994.

Chen, YHJ, DeMets, DL and Lan, KKG. Increasing the sample size when the unblinded interim result is promising, Statistics in Medicine, 23:1023-1038, 2004.

Gao, P, Ware, JH and Mehta, C, Sample size re-estimation for adaptive sequential design in clinical trials, Journal of Biopharmaceutical Statistics", 18:1184-1196, 2008.

Jennison, C and Turnbull, BW. Mid-course sample size modification in clinical trials based on the observed treatment effect. Statistics in Medicine, 22:971-993", 2003.

Lehmacher, W and Wassmer, G. Adaptive sample size calculations in group sequential trials, Biometrics, 55:1286-1290, 1999.

Liu, Q and Chi, GY., On sample size and inference for two-stage adaptive designs, Biometrics, 57:172-177, 2001.

Mehta, C and Pocock, S. Adaptive increase in sample size when interim results are promising: A practical guide with examples, Statistics in Medicine, 30:3267-3284, 2011.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | ```
# Following is a template for entering parameters for ssrCP
# Natural parameter value null and alternate hypothesis values
delta0 <- 0
delta1 <- 1
# timing of interim analysis for underlying group sequential design
timing <- .5
# upper spending function
sfu <- sfHSD
# upper spending function paramater
sfupar <- -12
# maximum sample size inflation
maxinflation <- 2
# assumed enrollment overrrun at IA
overrun <- 25
# interim z-values for plotting
z <- seq(0,4,.025)
# Type I error (1-sided)
alpha <- .025
# Type II error for design
beta <- .1
# Fixed design sample size
n.fix <- 100
# conditional power interval where sample
# size is to be adjusted
cpadj <- c(.3,.9)
# targeted Type II error when adapting sample size
betastar <- beta
# combination test (built-in options are: z2Z, z2NC, z2Fisher)
z2 <- z2NC
# use the above parameters to generate design
# generate a 2-stage group sequential design with
x<-gsDesign(k=2,n.fix=n.fix,timing=timing,sfu=sfu,sfupar=sfupar,
alpha=alpha,beta=beta,delta0=delta0,delta1=delta1)
# extend this to a conditional power design
xx <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj,
maxinc=maxinflation, z2=z2)
# plot the stage 2 sample size
plot(xx)
# demonstrate overlays on this plot
# overlay with densities for z1 under different hypotheses
lines(z,80+240*dnorm(z,mean=0),col=2)
lines(z,80+240*dnorm(z,mean=sqrt(x$n.I[1])*x$theta[2]),col=3)
lines(z,80+240*dnorm(z,mean=sqrt(x$n.I[1])*x$theta[2]/2),col=4)
lines(z,80+240*dnorm(z,mean=sqrt(x$n.I[1])*x$theta[2]*.75),col=5)
axis(side=4, at=80+240*seq(0,.4,.1), labels=as.character(seq(0,.4,.1)))
mtext(side=4,expression(paste("Density for ",z[1])),line=2)
text(x=1.5,y=90,col=2,labels=expression(paste("Density for ",theta,"=0")))
text(x=3.00,y=180,col=3,labels=expression(paste("Density for ",theta,"=", theta[1])))
text(x=1.00,y=180,col=4,labels=expression(paste("Density for ",theta,"=", theta[1],"/2")))
text(x=2.5,y=140,col=5,labels=expression(paste("Density for ",theta,"=", theta[1],"*.75")))
# overall line for max sample size
nalt <- xx$maxinc*x$n.I[2]
lines(x=par("usr")[1:2],y=c(nalt,nalt),lty=2)
# compare above design with different combination tests
# use sufficient statistic for final testing
xxZ <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj,
maxinc=maxinflation, z2=z2Z)
# use Fisher combination test for final testing
xxFisher <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj,
maxinc=maxinflation, z2=z2Fisher)
# combine data frames from these designs
y <- rbind(
data.frame(cbind(xx$dat,Test="Normal combination")),
data.frame(cbind(xxZ$dat,Test="Sufficient statistic")),
data.frame(cbind(xxFisher$dat,Test="Fisher combination")))
# plot stage 2 statistic required for positive combination test
ggplot(data=y,aes(x=z1,y=z2,col=Test))+geom_line()
# plot total sample size versus stage 1 test statistic
ggplot(data=y,aes(x=z1,y=n2,col=Test))+geom_line()
# check achieved Type I error for sufficient statistic design
Power.ssrCP(x=xxZ, theta=0)
# compare designs using observed vs planned theta for conditional power
xxtheta1 <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj,
maxinc=maxinflation, z2=z2, theta=x$delta)
# combine data frames for the 2 designs
y <- rbind(
data.frame(cbind(xx$dat,"CP effect size"="Obs. at IA")),
data.frame(cbind(xxtheta1$dat,"CP effect size"="Alt. hypothesis")))
# plot stage 2 sample size by design
ggplot(data=y,aes(x=z1,y=n2,col=CP.effect.size))+geom_line()
# compare power and expected sample size
y1 <- Power.ssrCP(x=xx)
y2 <- Power.ssrCP(x=xxtheta1)
# combine data frames for the 2 designs
y3 <- rbind(
data.frame(cbind(y1,"CP effect size"="Obs. at IA")),
data.frame(cbind(y2,"CP effect size"="Alt. hypothesis")))
# plot expected sample size by design and effect size
ggplot(data=y3,aes(x=delta,y=en,col=CP.effect.size))+geom_line() +
xlab(expression(delta)) + ylab("Expected sample size")
# plot power by design and effect size
ggplot(data=y3,aes(x=delta,y=Power,col=CP.effect.size))+geom_line() + xlab(expression(delta))
``` |

gsDesign documentation built on May 21, 2017, 12:38 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.