errors.SM: Exact error rates of specified sequential design

View source: R/errors.SM.R

errors.SMR Documentation

Exact error rates of specified sequential design

Description

For a given sequential design defined by vectors a, b and n, calculate the probability of a type 1 error (assuming p=p0) and type 2 error (assuming p=p1)

Usage

errors.SM(n, a, b, p0, p1)

Arguments

n

Design vector of planned sample sizes

a

Design vector of lower futility boundaries

b

Design vector of upper superiority boundaries

p0

Lower benchnmark for success probability

p1

Upper benchnmark for success probability

Value

list with attributes type1 and type 2

Author(s)

Chris J. Lloyd

Examples

# Example 1 in table 1 of Lloyd (2020)
n=c(5,6,5,9)
a=c(2,4,5,12)
b=c(5,9,11,13)
p0=.4
p1=.75
errors.SM(n,a,b,p0,p1)
# $type1
# [1] 0.09590162
# $type2
# [1] 0.1060701

CLAST documentation built on April 8, 2022, 9:06 a.m.