Learn R Programming

AGSDest (version 2.3.4)

pvalue: Calculates the p-value

Description

Calculates the repeated or stage-wise adjusted p-value of a GSD or a AGSD

Usage

pvalue(object, type = c("r", "so"))

Arguments

object

object of the class GSTobj or of the class AGSTobj

type

p-value type: repeated "r", stage-wise ordering "so" or both "b" (default: "b")

Value

The function pvalue returns according to the object the classical or adaptive p-value for the final stage. If the parameter value has the class GSTobj the classical p-value is calculated. If the parameter value has the class AGSTobj the adaptive p-value is calculated.

The calculated p-values are saved as:

pvalue.r

repeated p-value

pvalue.so

stage-wise adjusted p-value

Details

object can be an object of the class GSTobj or an object of the class AGSTobj. The function identifies the class of the object and calculates the corresponding p-value (classical or adaptive).

If object has class GSTobj, then a p-value for a classical GSD is calculated. type defines the type of confidence interval that is calculated

"r" Repeated p-value for a classical GSD
"so" Stage-wise adjusted p-value for a classical GSD

If object has class AGSTobj, then a p-value for a GSD with design adaptation is calculated. type defines the type of confidence interval that is calculated

"r" Repeated p-value for a GSD with design adaptations
"so" Stage-wise adjusted p-value for a GSD with design adaptations

References

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

Run this code
# NOT RUN {
##The following calculates the repeated p-value of a group sequential trial

# }
# NOT RUN {
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))

pvalue(GST,type="r")

##The stage-wise adjusted p-value of a group sequential trial is calculated by
pvalue(GST,type="so")

##The repeated p-value at the earlier stage T=1 where the trial stopping rule is not met.
pvalue(as.GST(GSD,GSDo=list(T=1,z=0.7)),type="r")

##If the stage-wise adjusted p-value is calculated at this stage,
##the function returns an error message

pvalue(as.GST(GSD,GSDo=list(T=1,z=0.7)),type="so")

##The repeated and the stage-wise adjusted p-value 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)
pvalue(AGST)

##The repeated p-value at the earlier stage T=2 where the stopping rule is not met.

pvalue(as.AGST(pT,iD,sT,sTo=list(T=2,z=1.7)),type="r")

##If the stage-wise adjusted p-value is calculated at this stage,
##the function returns an error message

pvalue(as.AGST(pT,iD,sT,sTo=list(T=2,z=1.7)),type="so")
# }

Run the code above in your browser using DataLab