| gs_prob | R Documentation |
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).
gs_prob(lower, upper, mean = 0, sigma)
lower |
Futility bounds ( |
upper |
Efficacy bounds ( |
mean |
Mean vector (recycled if of length 1). |
sigma |
Covariance matrix. |
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 = ...).
A data frame with look, prob_upper,
prob_lower and their cumulative sums cum_upper and
cum_lower.
gs_bounds
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.