Learn R Programming

GroupSeq (version 1.0)

computeAlphaLevel: Computes alpha level and other probabilities

Description

Computes alpha level and other probabilities for the number of tests of hypotheses. Method is a modification of Armitage, McPherson and Rowe. Consistent with Lan & DeMets 83, does not assume equally spaced information times.

Usage

computeAlphaLevel(n, t, t2, lowerBounds, upperBounds, drift, nMax)

Arguments

n
the number of analyses
t
the vector of analysis time point on (0,1).
t2
is the second or information time scale, for covariances
lowerBounds
the vector of upper bounds (standardized)
upperBounds
the vector of lower bounds (standardized)
drift
the noncentrality; at t=1, process has mean drift.
nMax
Number of interim analyses is limited to nMax=25.

Value

  • probStopping(i)is the prob of reaching ith analysis and stopping.
  • probExceedingUpper(i)is the prob of reaching ith and exceeding upper.
  • probExceedingLower(i)is the prob of reaching ith and exceeding lower.
  • expectedStoppingTimeis expected stopping time (not implemented).
  • probTotalis the total type I error used.

References

Armitage, McPherson & Rowe 1969 JRSSA Lan & DeMets 1983 Biometrika http://www.biostat.wisc.edu/landemets/

See Also

groupseq, stdDeviations pnorm, jointDensity

Examples

Run this code
## fictious example 
computeAlphaLevel(3, c(0.33,0.66,1),c(0.33,0.66,1), c(-1,0,1), c(2,3,4),0.2, 25)
## with following result:
#  $probAndStop
# [1] 0.1621561 1.0000000 1.0000000
#
# $probAndExceedingUpper
# [1] 2.970758e-02 7.447682e-04 9.675729e-06
#
# $probAndExceedingLower
# [1] 0.1324485 0.3115237 0.3327052
#
# $expectedStoppingTime
# [1] 0
#
# $totalTypeOneError
# [1] 0.8071395
#

Run the code above in your browser using DataLab