errors.SM {CLAST} | R Documentation |
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)
errors.SM(n, a, b, p0, p1)
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 |
list with attributes type1 and type 2
Chris J. Lloyd
# 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