seqmon {seqmon} | R Documentation |
Generic function that calculates boundary crossing probabilities used for monitoring clinical trials
Description
Finds the probability that a sequence of standard normal random variables derived from a normal stochastic process with independent increments will cross a lower and and upper boundary.
Usage
seqmon(a, b, t, int = rep(500, length(t)))
Arguments
a |
Lower boundary as a numeric vector of length |
b |
Upper boundary as a numeric vector of length |
t |
Information times as a numeric vector of length |
int |
number of intervals that the Z-space is partitioned into for calculation purposes, increasing this will improve accuracy, this is also a numeric vector of length |
Value
Produces a numeric vector of length the first
components are the probability that the
will be less than
for some
and be less than
for all
. The second
components are the probability that the
will be greater than
for some
and be greater than
for all
.
Note that the last probability in the sequence is the overall significance level of a sequential design that uses a
and b
as upper and lower boundaries. To get power you subtract the from
a
and b
where is the mean of
under the alternative hypothesis.
References
Schoenfeld, David A. "A simple algorithm for designing group sequential clinical trials." Biometrics 57.3 (2001): 972-974.
Examples
seqmon(a=c(0,0,0), b=c(qnorm(1-0.005),qnorm(1-0.005),2.025),
t=c(.33,.66,1), int = rep(500, 3))
t=c(.33,.66,1)
u=(qnorm(.8)+qnorm(1-0.025))
seqmon(a=c(0,0,0)-u*sqrt(t), b=c(qnorm(1-0.005),qnorm(1-0.005),2.025)-u*sqrt(t),
t=c(.33,.66,1), int = rep(500, 3))