seqmon | R Documentation |
Finds the probability that a sequence of standard normal random variables z_1, z_2,\ldots,z_m
derived from a normal stochastic process with independent increments will cross a lower and and upper boundary.
seqmon(a, b, t, int = rep(500, length(t)))
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 |
Produces a numeric vector of length 2 m
the first m
components are the probability that the z_k
will be less than a_k
for some k\le i
and be less than b_k
for all k \le i
. The second m
components are the probability that the z_k
will be greater than b_k
for some k\le i
and be greater than a_k
for all k \le i
.
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 \mu \sqrt(t)
from a
and b
where \mu
is the mean of z_m
under the alternative hypothesis.
Schoenfeld, David A. "A simple algorithm for designing group sequential clinical trials." Biometrics 57.3 (2001): 972-974.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.