Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function sfTDist()
provides perhaps the maximum flexibility among spending functions
provided in the gsDesign
package.
This function allows fitting of three points on a cumulative spending function curve; in this case, six parameters
are specified indicating an x and a y coordinate for each of 3 points.
Normally this function 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.
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 |
In the three-parameter specification, the first paramater (a) may be any real value, the second (b) any positive value,
and the third parameter (df=degrees of freedom) any real value 1 or greater. When |
The t-distribution spending function takes the form
f(t;α)=α F(a+bF^{-1}(t))
where F() is a cumulative t-distribution function with df
degrees of freedom
and F^{-1}() is its inverse.
An object of type spendfn
. See spending functions 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 31 32 33 34 35 36 37 38 39 | # 3-parameter specification: a, b, df
sfTDist(1, 1:5/6, c(-1, 1.5, 4))$spend
# 5-parameter specification fits 2 points, in this case
# the 1st 2 interims are at 25% and 50% of observations with
# cumulative error spending of 10% and 20%, respectively
# final parameter is df
sfTDist(1, 1:3/4, c(.25, .5, .1, .2, 4))$spend
# 6-parameter specification fits 3 points
# Interims are at 25%. 50% and 75% of observations
# with cumulative spending of 10%, 20% and 50%, respectively
# Note: not all 3 point combinations can be fit
sfTDist(1, 1:3/4, c(.25, .5, .75, .1, .2, .5))$spend
# Example of error message when the 3-points specified
# in the 6-parameter version cannot be fit
try(sfTDist(1, 1:3/4, c(.25, .5, .75, .1, .2, .3))$errmsg)
# sfCauchy (sfTDist with 1 df) and sfNormal (sfTDist with infinite df)
# show the limits of what sfTdist can fit
# for the third point are u3 from 0.344 to 0.6 when t3=0.75
sfNormal(1, 1:3/4, c(.25, .5, .1, .2))$spend[3]
sfCauchy(1, 1:3/4, c(.25, .5, .1, .2))$spend[3]
# plot a few t-distribution spending functions fitting
# t=0.25, .5 and u=0.1, 0.2
# to demonstrate the range of flexibility
t <- 0:100/100
plot(t, sfTDist(0.025, t, c(.25, .5, .1, .2, 1))$spend,
xlab="Proportion of final sample size",
ylab="Cumulative Type I error spending",
main="t-Distribution Spending Function Examples", type="l")
lines(t, sfTDist(0.025, t, c(.25, .5, .1, .2, 1.5))$spend, lty=2)
lines(t, sfTDist(0.025, t, c(.25, .5, .1, .2, 3))$spend, lty=3)
lines(t, sfTDist(0.025, t, c(.25, .5, .1, .2, 10))$spend, lty=4)
lines(t, sfTDist(0.025, t, c(.25, .5, .1, .2, 100))$spend, lty=5)
legend(x=c(.0, .3), y=.025*c(.7, 1), lty=1:5,
legend=c("df = 1", "df = 1.5", "df = 3", "df = 10", "df = 100"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.