Last chance! 50% off unlimited learning
Sale ends in
sfTruncated()
applies any other spending function over a restricted range.
This allows eliminating spending for early interim analyses when you desire not to stop for the bound being specified.
The truncation can come late in the trial.
if you desire to stop a trial any time after, say, 90 percent of information is available
and an analysis is performed.sfTruncated(alpha, t, param)
alpha=0.025
for one-sided Type I error specification
or alpha=0.1
for Type II error specification. However, this could be set to 1 if for descriptive purposes
you wish to see tspendfn
. See Spending function overview
for further details.sfTruncated
compresses spending into a sub-range of [0,1].
The parameter param$trange
specifies the range over which spending is to occur.
Within this range, spending is spent according to the spending function specified in
param$sf
along with the corresponding spending function parameter(s) in
param$param
.
See example using sfLinear
that spends uniformly over specified range.gsDesign
, gsDesign package overview# Eliminate spending forany interim at or before 20 percent of information.
# Complete spending at first interim at or after 80 percent of information.
s<-sfLinear(alpha=.05,t=(0:100)/100,param=c(.5,.5))
plot((0:100)/100,s$spend,type="l",main="Accelerating spending with sfTruncated",
xlab="Proportion of information",ylab="Spending")
s<-sfTruncated(alpha=.05,t=(0:100)/100,param=list(sf=sfLinear,trange=c(.2,.8),param=c(.5,.5)))
lines(col=2,(0:100)/100,s$spend)
text("Accelerated (red) spending over interval (.2,.8)",x=.03,y=.045,pos=4)
# now apply this in gsDesign
# note how sfupar is set up to do as above
# 1st version produces an error next to last interim must be before final spend
# x<-gsDesign(k=5, sfu=sfTruncated, sfupar=list(sf=sfLinear, param=c(.5,.5),
# trange=c(.2,.8)))
# now final spend occurs at > next to last interim
x<-gsDesign(k=5, sfu=sfTruncated, sfupar=list(sf=sfLinear, param=c(.5,.5), trange=c(.2,.95)))
x
# The above means if final analysis is done a little early, all spending can occur
# Suppose we skip 4th interim due to fast enrollment and set calendar date
# based on estimated full information, but come up with only 97 pct of plan
xA <- gsDesign(k=x$k-1,n.I=c(x$n.I[1:3],.97*x$n.I[5]),test.type=x$test.type,
maxn.IPlan=x$n.I[x$k],sfu=sfTruncated,
sfupar=list(sf=sfLinear, param=c(.5,.5), trange=c(.2,.95)))
xA
Run the code above in your browser using DataLab