Type: | Package |
Title: | Group Sequential Analysis of Clinical Trials |
Version: | 1.0 |
Author: | Lu Mao |
Maintainer: | Lu Mao <lmao@biostat.wisc.edu> |
URL: | https://sites.google.com/view/lmaowisc/ |
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>). |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
VignetteBuilder: | knitr |
Depends: | R (≥ 2.10) |
Imports: | mvtnorm |
Suggests: | knitr, rmarkdown |
NeedsCompilation: | no |
Packaged: | 2021-12-06 14:10:49 UTC; lmao |
Repository: | CRAN |
Date/Publication: | 2021-12-06 17:20:02 UTC |
Design of non-binding futility analysis at multiple points
Description
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).
Usage
fut(
alpha,
beta,
t,
gamma,
side = 2,
increment = 1e-04,
si = 0,
scale = "CP",
seed = 12345
)
Arguments
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. |
Value
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.
References
Gallo, P., Mao, L., and Shih, V.H. (2014). Alternative views on setting clinical trial futility criteria. Journal of Biopharmaceutical Statistics, 24, 976-993.
See Also
print.fut
, summary.fut
, plot.fut
,
powerplot
Examples
## 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
Description
Plot the planned futility boundaries in B- or z-values as a function of information time.
Usage
## 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,
...
)
Arguments
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 |
Value
No return value, called for side effects.
See Also
Examples
# see example for fut
Plot the power function of the planned analysis
Description
Plot the power curve of the planned futility analysis as a function of the effect size (in units of the hypothesized effect size).
Usage
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),
...
)
Arguments
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 |
Value
No return value, called for side effects.
See Also
Examples
# see example for fut
Print basic information about the futility design
Description
Print the power loss or sample size inflation factor due to the planned futility analysis.
Usage
## S3 method for class 'fut'
print(x, ...)
Arguments
x |
An object of class |
... |
Further arguments passed to or from other methods. |
Value
Print the results of fut
object.
See Also
Examples
# see example for fut
Print method for summary.fut objects
Description
Print the detailed summary of the futility design.
Usage
## S3 method for class 'summary.fut'
print(x, ...)
Arguments
x |
An object returned by |
... |
Further arguments passed to or from other methods |
Value
No return value, called for side effects.
See Also
Detailed summary of the futility design
Description
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.
Usage
## S3 method for class 'fut'
summary(object, ...)
Arguments
object |
An object returned by |
... |
further arguments passed to or from other methods. |
Value
An object of class summary.fut
with components:
t |
A |
b |
A |
z |
A |
type2 |
A |
loss |
A |
ess |
Expected sample size at |
... |
See Also
fut
, print.fut
, print.summary.fut
.
Examples
# see example for fut