# seqmon: Generic function that calculates boundary crossing... In seqmon: Group Sequential Design Class for Clinical Trials

## Description

Finds the probability that a sequence of standard normal random variables z_1, z_2,…,z_m derived from a normal stochastic process with independent increments will cross a lower and and upper boundary.

## Usage

 `1` ```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≤ i and be less than b_k for all k ≤ i. The second m components are the probability that the z_k will be greater than b_k for some k≤ i and be greater than a_k for all k ≤ 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 μ √(t) from `a` and `b` where μ 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

 ```1 2 3 4 5 6 7``` ```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 Sept. 5, 2020, 1:06 a.m.