Description Usage Arguments Value Note Author(s) References See Also Examples
The function sfHSD
implements a Hwang-Shih-DeCani spending function.
This is the default spending function for gsDesign()
. Normally it
will be passed to gsDesign
in the parameter sfu
for the upper
bound or sfl
for the lower bound to specify a spending function
family for a design. In this case, the user does not need to know the
calling sequence. The calling sequence is useful, however, when the user
wishes to plot a spending function as demonstrated below in examples.
A Hwang-Shih-DeCani spending function takes the form
f(t; alpha, gamma) = alpha * (1-exp(-gamma * t))/(1 - exp(-gamma))
where gamma is the
value passed in param
. A value of gamma=-4 is used
to approximate an O'Brien-Fleming design (see sfExponential
for a better fit), while a value of gamma=1 approximates a
Pocock design well.
1 |
alpha |
Real value > 0 and no more than 1. Normally,
|
t |
A vector of points with increasing values from 0 to 1, inclusive. Values of the proportion of sample size/information for which the spending function will be computed. |
param |
A single real value specifying the gamma parameter for which Hwang-Shih-DeCani spending is to be computed; allowable range is [-40, 40] |
An object of type spendfn
. See Spending_Function_Overview for further details.
The manual is not linked to this help file, but is available in library/gsdesign/doc/gsDesignManual.pdf in the directory where R is installed.
Keaven Anderson keaven\_anderson@merck.com
Jennison C and Turnbull BW (2000), Group Sequential Methods with Applications to Clinical Trials. Boca Raton: Chapman and Hall.
Spending_Function_Overview, gsDesign
,
gsDesign package overview
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 | library(ggplot2)
# design a 4-analysis trial using a Hwang-Shih-DeCani spending function
# for both lower and upper bounds
x <- gsDesign(k = 4, sfu = sfHSD, sfupar = -2, sfl = sfHSD, sflpar = 1)
# print the design
x
# since sfHSD is the default for both sfu and sfl,
# this could have been written as
x <- gsDesign(k = 4, sfupar = -2, sflpar = 1)
# print again
x
# plot the spending function using many points to obtain a smooth curve
# show default values of gamma to see how the spending function changes
# also show gamma=1 which is supposed to approximate a Pocock design
t <- 0:100 / 100
plot(t, sfHSD(0.025, t, -4)$spend,
xlab = "Proportion of final sample size",
ylab = "Cumulative Type I error spending",
main = "Hwang-Shih-DeCani Spending Function Example", type = "l"
)
lines(t, sfHSD(0.025, t, -2)$spend, lty = 2)
lines(t, sfHSD(0.025, t, 1)$spend, lty = 3)
legend(
x = c(.0, .375), y = .025 * c(.8, 1), lty = 1:3,
legend = c("gamma= -4", "gamma= -2", "gamma= 1")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.