gs_prob: Stopping probabilities of a group sequential design

View source: R/gs_prob.R

gs_probR Documentation

Stopping probabilities of a group sequential design

Description

For statistics with a multivariate normal distribution, computes at each look the probability of continuing to the look and then crossing the efficacy bound (prob_upper) or falling below the futility bound (prob_lower).

Usage

gs_prob(lower, upper, mean = 0, sigma)

Arguments

lower

Futility bounds (-Inf for none). At the last look the bound is usually equal to the efficacy bound.

upper

Efficacy bounds (Inf for none).

mean

Mean vector (recycled if of length 1).

sigma

Covariance matrix.

Details

Rectangle probabilities are computed with mvtnorm::pmvnorm(). The Miwa algorithm, which is deterministic, is used for rectangles of at most three coordinates and when the covariance matrix is that of a Markov sequence (its inverse is tridiagonal), as for statistics with independent increments. For four or more coordinates with other covariance matrices, such as those of variance = "alternative" and "studentized" in ms_test, the Miwa algorithm was found to be inaccurate, and for nine or more coordinates with two finite limits for some coordinate (futility bounds at eight or more earlier looks), for which mvtnorm leaves out terms of the inclusion-exclusion of the Miwa algorithm, the Genz-Bretz algorithm is used, with a fixed seed, so that the results are reproducible and the random number generator of the session is not changed, and with an absolute error tolerance of 1e-5 for each rectangle, which can be changed with options(DesignComplexSurvival.genz_abseps = ...).

Value

A data frame with look, prob_upper, prob_lower and their cumulative sums cum_upper and cum_lower.

See Also

gs_bounds

Examples

b <- gs_bounds(c(0.5, 1))
corr <- matrix(c(1, sqrt(0.5), sqrt(0.5), 1), 2)
gs_prob(b$lower, b$upper, mean = 0, sigma = corr)
gs_prob(b$lower, b$upper, mean = c(2, 2.9), sigma = corr)


DesignComplexSurvival documentation built on Nov. 23, 2026, 5:07 p.m.