Calculates the repeated confidence bound or the confidence bound based on the stage-wise ordering of a GSD or a AGSD
Usage
seqconfint(object, type = c("r", "so"), level = NULL)
Arguments
object
object of the classGSTobj or of the classAGSTobj
type
confidence type: repeated "r", stage-wise ordering "so" or both "b" (default: "b")
level
type I error rate (default: NULL)
Details
object can be an object of the classGSTobj or an object of the classAGSTobj.
The function identifies the class of the object and calculates the corresponding confidence interval (classical or adaptive).
If object has classGSTobj, then a confidence bound for a classical GSD is calculated.
type defines the type of confidence interval that is calculated
"r"
Repeated confidence bound for a classical GSD
"so"
Confidence bound for a classical GSD based on the stage-wise ordering
If object has classAGSTobj, then a confidence bound for a GSD with design adaptation is calculated.
type defines the type of confidence interval that is calculated
"r"
Repeated confidence bound for a GSD with design adaptations
"so"
Confidence bound for a GSD with design adaptation based on the stage-wise ordering
By setting level to the value 0.5 the conservative point estimate is calculated. Default is the level of the primary trial.
Value
The function seqconfint returns according to the class of object the classical or adaptive confidence bound.
If object has classGSTobj the classical confidence bound is calculated. If the
parameter value has the classAGSTobj the adaptive confidence bound is calculated.
The calculated confidence bounds are saved as:
cb.r
repeated confidence bound
cb.so
confidence bound based on the stage-wise ordering
If the level is set to 0.5, the calculated point estimates are:
est.mu
Median unbiased point estimate, based on the stage-wise ordering
est.cons
Flexible, but conservative repeated point estimate
Note
The stage-wise adjusted confidence interval can only be calculated at the stage where the trial stops and is only valid if the stopping rule is met.
The repeated confidence interval can be calculated at every stage of the trial and
not just at the stage where the trial stops and is also valid if the stopping rule is not met.
For calculating the sequential confidence intervals at stage T the user has to specify the outcome GSDo in the object GSTobj
or sTo (secondary trial outcome) in the object AGSTobj. A trial outcome is a list of the form
list=(T=stage of interim analysis, z = interim z-statistic); see the example below.
Brannath, W, Mehta, CR, Posch, M (2008) ”Exact confidence bounds following
adaptive group sequential tests”, Biometrics accepted.
Jennison, C, Turnbull, BW (1989) ”Repeated confidence intervals for group
sequential clinical trials”, Contr. Clin. Trials, 5, 33-45.
Mehta, CR, Bauer, P, Posch, M, Brannath, W (2007) ”Repeated confidence
intervals for adaptive group sequential trials”, Statistics in Medicine, 26, 5422-5433.
Mueller, HH, Schaefer, H (2001) ”Adaptive group sequential design for clinical
trials: Combining the advantages of adaptive and of classical group sequential
approaches”, Biometrics, 57, 886-891.
Tsiatis,AA, Rosner,GL, Mehta,CR (1984) ”Exact confidence intervals
following a group sequential test”, Biometrics, 40, 797-804.
See Also
AGSTobj, GSTobj
Examples
##The following calculates the repeated confidence bound of a group sequential trial
GSD <- plan.GST(K=4, SF=1, phi=0, alpha=0.025, delta=6, pow=0.8,
compute.alab=TRUE, compute.als=TRUE)
GST <- as.GST(GSD=GSD, GSDo=list(T=2, z=3.1))
seqconfint(GST, type="r")
##The confidence bound based on the stage-wise ordering of a group sequential trial is calculated by
seqconfint(GST, type="so")
##The repeated confidence interval at the earlier stage T=1 where the
##trial stopping rule is not met.
seqconfint(as.GST(GSD, GSDo=list(T=1, z=0.7)), type="r")
##The repeated confidence bound and the confidence bound
##based on the stage-wise ordering of a group sequential trial
##after a design adaptation is calculated by
pT <- plan.GST(K=3, SF=4, phi=-4, alpha=0.05, delta=6, pow=0.9,
compute.alab=TRUE, compute.als=TRUE)
iD <- list(T=1, z=1.090728)
swImax <- 0.0625
I2min <- 3*swImax
I2max <- 3*swImax
sT <- adapt(pT=pT, iD=iD, SF=1, phi=0, cp=0.8, theta=5, I2min, I2max, swImax)
sTo <- list(T=2, z=2.393)
AGST <- as.AGST(pT=pT, iD=iD, sT=sT, sTo=sTo)
seqconfint(AGST)
##The repeated confidence interval at the earlier stage T=2 where the
##trial stopping rule is not met.
seqconfint(as.AGST(pT, iD, sT, sTo=list(T=2, z=1.7)), type="r")
## Not run:
##If the stage-wise adjusted confidence interval is calculated at this stage,
##the function returns an error message
seqconfint(as.AGST(pT, iD, sT, sTo=list(T=2, z=1.7)), type="so")
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(AGSDest)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AGSDest/seqconfint.Rd_%03d_medium.png", width=480, height=480)
> ### Name: seqconfint
> ### Title: Calculates confidence interval
> ### Aliases: seqconfint
> ### Keywords: methods
>
> ### ** Examples
>
> ##The following calculates the repeated confidence bound of a group sequential trial
>
> GSD <- plan.GST(K=4, SF=1, phi=0, alpha=0.025, delta=6, pow=0.8,
+ compute.alab=TRUE, compute.als=TRUE)
>
> GST <- as.GST(GSD=GSD, GSDo=list(T=2, z=3.1))
> seqconfint(GST, type="r")
$cb.r
[1] 0.4105916
>
> ##The confidence bound based on the stage-wise ordering of a group sequential trial is calculated by
>
> seqconfint(GST, type="so")
$cb.so
[1] 3.417739
>
> ##The repeated confidence interval at the earlier stage T=1 where the
> ##trial stopping rule is not met.
>
> seqconfint(as.GST(GSD, GSDo=list(T=1, z=0.7)), type="r")
$cb.r
[1] -15.40928
>
> ##The repeated confidence bound and the confidence bound
> ##based on the stage-wise ordering of a group sequential trial
> ##after a design adaptation is calculated by
>
> pT <- plan.GST(K=3, SF=4, phi=-4, alpha=0.05, delta=6, pow=0.9,
+ compute.alab=TRUE, compute.als=TRUE)
>
> iD <- list(T=1, z=1.090728)
>
> swImax <- 0.0625
>
> I2min <- 3*swImax
> I2max <- 3*swImax
>
> sT <- adapt(pT=pT, iD=iD, SF=1, phi=0, cp=0.8, theta=5, I2min, I2max, swImax)
>
> sTo <- list(T=2, z=2.393)
>
> AGST <- as.AGST(pT=pT, iD=iD, sT=sT, sTo=sTo)
> seqconfint(AGST)
$cb.r
[1] 1.176147
$cb.so
[1] 1.601169
>
> ##The repeated confidence interval at the earlier stage T=2 where the
> ##trial stopping rule is not met.
>
> seqconfint(as.AGST(pT, iD, sT, sTo=list(T=2, z=1.7)), type="r")
$cb.r
[1] -0.0009624282
>
> ## Not run:
> ##D ##If the stage-wise adjusted confidence interval is calculated at this stage,
> ##D ##the function returns an error message
> ##D
> ##D seqconfint(as.AGST(pT, iD, sT, sTo=list(T=2, z=1.7)), type="so")
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>