seqmon: Generic function that calculates boundary crossing...

seqmonR 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 z_1, z_2,\ldots,z_m 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 m

b

Upper boundary as a numeric vector of length m

t

Information times as a numeric vector of length m

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 m

Value

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.

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


seqmon documentation built on May 29, 2024, 9:14 a.m.