| gs_spend | R Documentation |
Cumulative error spent at information fractions t for a total
(one-sided) error alpha.
gs_spend(
t,
alpha = 0.025,
type = c("OF", "Pocock", "HSD", "power", "user"),
param = NULL
)
t |
Information fractions between 0 and 1. |
alpha |
Total error to spend. |
type |
Type of spending function: |
param |
Parameter of the spending function (required for
|
The available types are
"OF": Lan-DeMets spending function of O'Brien-Fleming type,
2 - 2 pnorm(qnorm(1 - alpha / 2) / sqrt(t)).
"Pocock": Lan-DeMets spending function of Pocock type,
alpha log(1 + (exp(1) - 1) t).
"HSD": Hwang-Shih-DeCani family with parameter
param (gamma), alpha (1 - exp(-gamma t)) / (1 - exp(-gamma)),
and alpha t for gamma = 0.
"power": Kim-DeMets power family with parameter
param (rho), alpha t^rho.
"user": cumulative proportions of alpha given in
param, one value per element of t.
The same functions are used for beta spending, with alpha replaced
by the total type II error.
Numeric vector of cumulative error spent.
Lan KKG, DeMets DL (1983). Discrete sequential boundaries for clinical trials. Biometrika 70:659-663.
gs_bounds
gs_spend(c(0.5, 0.75, 1), alpha = 0.025, type = "OF")
gs_spend(c(0.5, 0.75, 1), alpha = 0.1, type = "HSD", param = -2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.