Learn R Programming

MultiGroupSequential (version 1.1.0)

spendingfun: Calculate alpha spending function

Description

spendingfun() calculates the alpha spending function.

Usage

spendingfun(alpha, fractions = seq(0.2, 1, by = 0.2), family = "OBF", rho = 1)

Value

List with an element named aseq for the alpha spending sequence.

Arguments

alpha

Numeric scalar of the overall alpha to be spent.

fractions

Numeric vector of the sequence of information fractions. All elements should be between 0 and 1 with the last one being exactly 1.

family

Character scalar for the family of spending functions, one of "OBF", "pocock", "power".

rho

Numeric scalar of auxiliary parameter for O'Brien-Fleming and power family.

Author

Xiaodong Luo

Details

  • "OBF": O'Brien-Fleming family; \(2\{1-\Phi(\Phi^{-1}(1-\alpha/2)/t^{\rho/2})\}\);

  • "pocock": Pocock family; \(\alpha \log\{1+(e-1)*t\}\);

  • "power": Power family; \(\alpha*t^{\rho}\)

Note that the OBF and Pocock spending functions are not the originally proposed ones, they are the modified ones that closely resemble the original versions. That being said, you might still see some differences.

Examples

Run this code
spendingfun(
  alpha = 0.025,
  fractions = seq(0.2, 1, by = 0.2),
  family = "OBF",
  rho = 1
)

Run the code above in your browser using DataLab