Title: | Group Sequential Analysis of Clinical Trials |
---|---|
Description: | Design of group sequential trials, including non-binding futility analysis at multiple time points (Gallo, Mao, and Shih, 2014, <doi:10.1080/10543406.2014.932285>). |
Authors: | Lu Mao |
Maintainer: | Lu Mao <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2025-01-20 04:25:20 UTC |
Source: | https://github.com/cran/grpseq |
Design of non-binding futility looks at multiple information times based on conditional power (CP), predictive power (PP), or condition power under current estimate (CPd) (Gallo, Mao, and Shih, 2014).
fut( alpha, beta, t, gamma, side = 2, increment = 1e-04, si = 0, scale = "CP", seed = 12345 )
fut( alpha, beta, t, gamma, side = 2, increment = 1e-04, si = 0, scale = "CP", seed = 12345 )
alpha |
Type I error. |
beta |
Type II error (1 - power). |
t |
A numeric vector of information times in |
gamma |
A numeric vector of probabilities (whose meaning depends on
|
side |
|
increment |
Error for the numerical solution of the sample size inflation factor. |
si |
|
scale |
Character string specifying the scaled used: |
seed |
Seed number for the randomized evaluation of multivariate normal distribution. |
An object of class fut
with the following components.
gamma1
: conditional power at information times t
converted from
the supplied gamma
and scale
;
theta
: local alternative associated with the actual power when the
futility rules of enforced;
IF
: sample size inflation factor if si
=1;
loss
: power loss if si
=0.
Gallo, P., Mao, L., and Shih, V.H. (2014). Alternative views on setting clinical trial futility criteria. Journal of Biopharmaceutical Statistics, 24, 976-993.
print.fut
, summary.fut
, plot.fut
,
powerplot
## load the package library(grpseq) ## two-sided level 0.05 test with 80% power; ## evenly spaced three futility looks with predictive power 20%; ## inflate sample size to recoup power. obj1 <- fut(alpha=0.05,beta=0.2,t=(1:3)/4,gamma=0.2*rep(1,3),side=2,scale="PP",si=1) obj1 ## print the summary results summary(obj1) ## do the same thing without sample size inflation obj2 <- fut(alpha=0.05,beta=0.2,t=(1:3)/4,gamma=0.2*rep(1,3),side=2,scale="PP",si=0) obj2 ## print the summary results summary(obj2) oldpar <- par(mfrow = par("mfrow")) par(mfrow=c(1,2)) ## plot the futility boundaries by z-value plot(obj2,scale='z',lwd=2,main="") ## plot the futility boundaries by B-value plot(obj2,scale='b',lwd=2,main="") par(oldpar) ## plot the power curve as a function of the (local) ## effect size in units of the hypothesized effect size ## ref=TRUE requests the power curve for the original one-time analysis powerplot(obj2,lwd=2, ref=TRUE)
## load the package library(grpseq) ## two-sided level 0.05 test with 80% power; ## evenly spaced three futility looks with predictive power 20%; ## inflate sample size to recoup power. obj1 <- fut(alpha=0.05,beta=0.2,t=(1:3)/4,gamma=0.2*rep(1,3),side=2,scale="PP",si=1) obj1 ## print the summary results summary(obj1) ## do the same thing without sample size inflation obj2 <- fut(alpha=0.05,beta=0.2,t=(1:3)/4,gamma=0.2*rep(1,3),side=2,scale="PP",si=0) obj2 ## print the summary results summary(obj2) oldpar <- par(mfrow = par("mfrow")) par(mfrow=c(1,2)) ## plot the futility boundaries by z-value plot(obj2,scale='z',lwd=2,main="") ## plot the futility boundaries by B-value plot(obj2,scale='b',lwd=2,main="") par(oldpar) ## plot the power curve as a function of the (local) ## effect size in units of the hypothesized effect size ## ref=TRUE requests the power curve for the original one-time analysis powerplot(obj2,lwd=2, ref=TRUE)
Plot the planned futility boundaries in B- or z-values as a function of information time.
## S3 method for class 'fut' plot( x, scale = "z", add = FALSE, lty = 8, xlab = "Info Time", ylab = "z score", type = "b", pch = 1, cex = 1, main = "Futility Boundary for the Planned Test", xlim = c(0, 1.1), ylim = NULL, ... )
## S3 method for class 'fut' plot( x, scale = "z", add = FALSE, lty = 8, xlab = "Info Time", ylab = "z score", type = "b", pch = 1, cex = 1, main = "Futility Boundary for the Planned Test", xlim = c(0, 1.1), ylim = NULL, ... )
x |
An object returned by |
scale |
|
add |
If TRUE, the curve will be overlaid on an existing plot; otherwise, a separate plot will be constructed. |
lty |
Line type for the segments connecting the z-/B-value points. |
xlab |
A label for the x axis, defaults to a description of x. |
ylab |
A label for the y axis, defaults to a description of y. |
type |
Plot type. |
pch |
Point types for the z-/B-values. |
cex |
Point size. |
main |
A main title for the plot. |
xlim |
The x limits of the plot. |
ylim |
The y limits of the plot. |
... |
Other arguments that can be passed to the underlying |
No return value, called for side effects.
# see example for fut
# see example for fut
Plot the power curve of the planned futility analysis as a function of the effect size (in units of the hypothesized effect size).
powerplot( x, ref = FALSE, add = FALSE, lty = 1, ref.lty = 2, lwd = 1, xlab = expression(delta), ylab = "Power", main = "Power curve of the planned futility analysis", xlim = c(0, 1.5), ylim = c(0, 1), ... )
powerplot( x, ref = FALSE, add = FALSE, lty = 1, ref.lty = 2, lwd = 1, xlab = expression(delta), ylab = "Power", main = "Power curve of the planned futility analysis", xlim = c(0, 1.5), ylim = c(0, 1), ... )
x |
An object returned by |
ref |
If TRUE, power curve of the reference test (one that ignores the futility boundaries) will be overlaid. |
add |
If TRUE, the curve will be overlaid on an existing plot; otherwise, a separate plot will be constructed. |
lty |
Line type for the power curve of the futility analysis. |
ref.lty |
Line type for the power curve of the reference if |
lwd |
Line width. |
xlab |
A label for the x axis, defaults to a description of x. |
ylab |
A label for the y axis, defaults to a description of y. |
main |
A main title for the plot. |
xlim |
The x limits of the plot. |
ylim |
The y limits of the plot. |
... |
Other arguments that can be passed to the underlying |
No return value, called for side effects.
# see example for fut
# see example for fut
Print the power loss or sample size inflation factor due to the planned futility analysis.
## S3 method for class 'fut' print(x, ...)
## S3 method for class 'fut' print(x, ...)
x |
An object of class |
... |
Further arguments passed to or from other methods. |
Print the results of fut
object.
# see example for fut
# see example for fut
Print the detailed summary of the futility design.
## S3 method for class 'summary.fut' print(x, ...)
## S3 method for class 'summary.fut' print(x, ...)
x |
An object returned by |
... |
Further arguments passed to or from other methods |
No return value, called for side effects.
Provide key information about the futility design, including B-/z-values, beta (type II error) spent, and power loss at each futility look as well the the sample size distribution under the null hypothesis.
## S3 method for class 'fut' summary(object, ...)
## S3 method for class 'fut' summary(object, ...)
object |
An object returned by |
... |
further arguments passed to or from other methods. |
An object of class summary.fut
with components:
t |
A |
b |
A |
z |
A |
type2 |
A |
loss |
A |
ess |
Expected sample size at |
... |
fut
, print.fut
, print.summary.fut
.
# see example for fut
# see example for fut