Last data update: 2014.03.03

R: Calculates the p-value
pvalueR Documentation

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")

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

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

Note

The stage-wise adjusted p-value can only be calculated at the stage where the trial stops and is only valid if the stopping rule is met.

The repeated p-value 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 p-values 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.

Author(s)

Niklas Hack niklas.hack@meduniwien.ac.at and Werner Brannath werner.brannath@meduniwien.ac.at

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

##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")

## End(Not run)

Results