Learn R Programming

GroupSeq (version 1.0)

computeBounds: calculate boundaries

Description

Function to calculate boundaries corresponding to particular type I error spending rates and times of interim analyses, see Lan & DeMets 83.

Usage

computeBounds(n, drift, alpha, phi, t, t2, OneOrTwoSidedBounds, whatSpendingFunctionIsUsed, boundsTruncation)

Arguments

n
is the number of interim analyses
drift
drift is the true mean of the process, the noncentrality - drift is set to zero, and so does not affect function
alpha
is the total type I error.
phi
optional Parameter referring to Power Family
t
is the information times.
t2
is the 'second' time scale, used for the covariance of sequential statistics, usually number of events or subjects.
OneOrTwoSidedBounds
indicates one or two sided boundaries.
whatSpendingFunctionIsUsed
indicates type I error spending function.
boundsTruncation
is the user selected truncation on integration limits.

Value

  • lowerBoundsthe vector of lower standardized boundaries
  • upperBoundsthe vector of upper standardized boundaries
  • probExitvector of exit probabilities
  • probDifference(i)probExit(i)-probExit(i-1)

References

Lan & DeMets 1983 Biometrika http://www.biostat.wisc.edu/landemets/

See Also

groupseq, alphaByUseFunction stdDeviations, pnorm jointDensity, tailProbability, searchForBound

Examples

Run this code
## fictious example
computeBounds(2,0,0.05,0,c(0.5,1.0),c(0.5,1.0),1,1,8)
##with following result:
#$lowerBounds
#[1] -8 -8
#
#$upperBounds
#[1] 2.537988 1.662070
#
#$exitProbabilities
#[1] 0.005574597 0.050000000
#
#$differencesExitProbabilities
#[1] 0.005574597 0.044425403

Run the code above in your browser using DataLab