ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (2024)

In gsDesign: Group Sequential Design

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

View source: R/ssrCP.R

Description

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 Poco*ck (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.

Usage

 1 2 3 4 5 6 7 8 910
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

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 NULL (default), conditional power calculation will be based on estimated interim treatment effect. Otherwise, theta is the standardized effect size used for conditional power calculation. Using the alternate hypothesis treatment effect can be more efficient than the estimated effect size; see Liu and Chi, Biometrics (2001).

maxinc

Maximum fold-increase from planned maximum sample size in underlying group sequential design provided in x.

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 is used.

x

A group sequential design with 2 stages (k=2) generated by gsDesign. For plot.ssrCP, x is a design returned by ssrCP().

z2

a combination function that returns a test statistic cutoff for the stage 2 test based in the interim test statistic supplied in z1, the design x and the stage 2 sample size.

...

Allows passing of arguments that may be needed by the user-supplied function, codez2. In the case of plot.ssrCP(), allows passing more graphical parameters.

Additional arguments for Power.ssrCP():

delta

Natural parameter values for power calculation; see gsDesign for a description of how this is related to theta.

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 r will not be changed by the user.

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 NULL

mar

Plot margins; see help for par

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

Details

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 Poco*ck, 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.

Value

ssrCP returns a list with the following items:

x

As input.

z2fn

As input in z2.

theta

standardize effect size used for conditional power; if NULL is input, this is computed as z1/sqrt(n1) where n1 is the stage 1 sample size.

maxinc

As input.

overrun

As input.

beta

As input.

cpadj

As input.

dat

A data frame containing the input z1 values, computed cutoffs for the standard normal test statistic based solely on stage 2 data (z2), stage 2 sample sizes (n2), stage 2 conditional power (CP), standardize effect size used for conditional power calculation (theta), and the natural parameter value corresponding to theta (delta). The relation between theta and delta is determined by the delta0 and delta1 values from x: delta = delta0 + theta(delta1-delta0).

Author(s)

Keaven Anderson keaven\_anderson@merck.

References

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 Poco*ck, S. Adaptive increase in sample size when interim results are promising: A practical guide with examples, Statistics in Medicine, 30:3267-3284, 2011.

See Also

gsDesign

Examples

 1 2 3 4 5 6 7 8 91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
# Following is a template for entering parameters for ssrCP# Natural parameter value null and alternate hypothesis valuesdelta0 <- 0delta1 <- 1# timing of interim analysis for underlying group sequential designtiming <- .5# upper spending function sfu <- sfHSD# upper spending function paramatersfupar <- -12# maximum sample size inflationmaxinflation <- 2# assumed enrollment overrrun at IAoverrun <- 25# interim z-values for plottingz <- seq(0,4,.025)# Type I error (1-sided)alpha <- .025# Type II error for designbeta <- .1# Fixed design sample sizen.fix <- 100# conditional power interval where sample # size is to be adjustedcpadj <- c(.3,.9)# targeted Type II error when adapting sample sizebetastar <- 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 designxx <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj, maxinc=maxinflation, z2=z2)# plot the stage 2 sample sizeplot(xx)# demonstrate overlays on this plot# overlay with densities for z1 under different hypotheseslines(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 sizenalt <- 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 testingxxZ <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj, maxinc=maxinflation, z2=z2Z)# use Fisher combination test for final testingxxFisher <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj, maxinc=maxinflation, z2=z2Fisher)# combine data frames from these designsy <- 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 testggplot(data=y,aes(x=z1,y=z2,col=Test))+geom_line()# plot total sample size versus stage 1 test statisticggplot(data=y,aes(x=z1,y=n2,col=Test))+geom_line()# check achieved Type I error for sufficient statistic designPower.ssrCP(x=xxZ, theta=0)# compare designs using observed vs planned theta for conditional powerxxtheta1 <- ssrCP(x=x,z1=z,overrun=overrun,beta=betastar,cpadj=cpadj, maxinc=maxinflation, z2=z2, theta=x$delta)# combine data frames for the 2 designsy <- 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 designggplot(data=y,aes(x=z1,y=n2,col=CP.effect.size))+geom_line()# compare power and expected sample sizey1 <- Power.ssrCP(x=xx)y2 <- Power.ssrCP(x=xxtheta1)# combine data frames for the 2 designsy3 <- 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 sizeggplot(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 sizeggplot(data=y3,aes(x=delta,y=Power,col=CP.effect.size))+geom_line() + xlab(expression(delta))

Example output

ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (1)ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (2)ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (3)ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (4)ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (5)ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (6)

Loading required package: xtableLoading required package: ggplot2 theta delta Power en1 0 0 0.0220804 95.11565

gsDesign documentation built on May 2, 2019, 4:49 p.m.

Related to ssrCP in gsDesign...

gsDesign index

Package overview

ssrCP: Sample size re-estimation based on conditional power in gsDesign: Group Sequential Design (2024)
Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 5399

Rating: 4.7 / 5 (47 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.