Learn R Programming

triggerstrategy (version 1.2.0)

alpha2boundary: Convert cumulative alpha levels to normal critical boundaries

Description

This function converts cumulative alpha levels into normal critical boundaries.

Usage

alpha2boundary(
  alphas,
  t,
  initIntvl = c(1, 2 * stats::qnorm(p = alphas[1], lower.tail = FALSE))
)

Value

a vector of critical boundaries

Arguments

alphas

a list of cumulative errors from some error spending functions

t

a vector of information times

initIntvl

a pair of numbers as the lower and upper bounds of critical boundaries, used for stats::uniroot function

Author

Jiangtao Gou

Details

The current version of ldbounds::ldBounds may not work for Hwang-Shih-DeCani boundaries.

Examples

Run this code
library(ldbounds)
tvec <- c(0.5,1)
result <- ldbounds::ldBounds(t=tvec, iuse=1, alpha=0.05, sides=1)
print(result$upper.bounds)
bd <- alpha2boundary(alphas = result$exit.pr, t=tvec)
print(bd)

Run the code above in your browser using DataLab