Description Usage Arguments Value Note Author(s) References See Also Examples
The function sfPower()
implements a Kim-DeMets (power) spending
function. This is a flexible, one-parameter spending function recommended by
Jennison and Turnbull (2000). 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 Kim-DeMets spending function takes the form
f(t; alpha, rho) = alpha t^rho
where rho is the value
passed in param
. See examples below for a range of values of
rho that may be of interest (param=0.75
to 3
are
documented there).
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, positive value specifying the rho parameter for which Kim-DeMets spending is to be computed; allowable range is (0,15] |
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.
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 31 32 33 | library(ggplot2)
# design a 4-analysis trial using a Kim-DeMets spending function
# for both lower and upper bounds
x <- gsDesign(k = 4, sfu = sfPower, sfupar = 3, sfl = sfPower, sflpar = 1.5)
# print the design
x
# plot the spending function using many points to obtain a smooth curve
# show rho=3 for approximation to O'Brien-Fleming and rho=.75 for
# approximation to Pocock design.
# Also show rho=2 for an intermediate spending.
# Compare these to Hwang-Shih-DeCani spending with gamma=-4, -2, 1
t <- 0:100 / 100
plot(t, sfPower(0.025, t, 3)$spend,
xlab = "Proportion of sample size",
ylab = "Cumulative Type I error spending",
main = "Kim-DeMets (rho) versus Hwang-Shih-DeCani (gamma) Spending",
type = "l", cex.main = .9
)
lines(t, sfPower(0.025, t, 2)$spend, lty = 2)
lines(t, sfPower(0.025, t, 0.75)$spend, lty = 3)
lines(t, sfHSD(0.025, t, 1)$spend, lty = 3, col = 2)
lines(t, sfHSD(0.025, t, -2)$spend, lty = 2, col = 2)
lines(t, sfHSD(0.025, t, -4)$spend, lty = 1, col = 2)
legend(
x = c(.0, .375), y = .025 * c(.65, 1), lty = 1:3,
legend = c("rho= 3", "rho= 2", "rho= 0.75")
)
legend(
x = c(.0, .357), y = .025 * c(.65, .85), lty = 1:3, bty = "n", col = 2,
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.