## Not run:
# L <- -0.2
# U <- 0.2
# theta <- 0
# sigma <- 0.4
# alpha <- 0.05
# beta <- 0.2
# K <- 4
# r <- 1
#
# # non-sequential
# n.fix <- nfix(r, L,U,theta,sigma,alpha,beta)
#
# # sequential without futility
# bound1<- equivonly(L, U, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta)
# # figureE (bound1, K)
#
# # sequential with nonbinding futility
# bound2 <- nonbinding(L,U,theta,sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha,beta)
#
# # sequential with binding futility
# bound3 <- binding(L, U, theta, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta)
#
# # finding nminmax with nonbinding futility
# bound4 <- nminmax(L, U, theta, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta)
# figureEF(bound4, K)
#
# # finding nminmax with binding futility
# bound5 <- nminmax(L, U, theta, sigma, n.fix$n1, n.fix$n2, 1:K/K, alpha, beta)
# figureEF(bound5, K)
#
#
# # operating characteristics under H0
# theta <- L
# oc1 <- oc(L, U, theta, sigma, K, n.fix$n1, n.fix$n2, bound1, futility=FALSE)
# oc2 <- oc(L, U, theta, sigma, K, n.fix$n1, n.fix$n2, bound2, futility=TRUE)
# oc3 <- oc(L, U, theta, sigma, K, n.fix$n1, n.fix$n2, bound3, futility=TRUE, binding=TRUE)
# oc4 <- oc(L, U, theta, sigma, K, bound4$n1minmax, bound4$n2minmax, bound4, futility=TRUE)
# oc5 <- oc(L, U, theta, sigma, K, bound5$n1minmax, bound5$n2minmax, bound5,
# futility=TRUE, binding=TRUE)
#
#
# # operating characteristics under H1
# theta <- 0
# oc6 <- oc(L, U, theta, sigma, K, n.fix$n1, n.fix$n2, bound1, futility=FALSE)
# oc7 <- oc(L, U, theta, sigma, K, n.fix$n1, n.fix$n2, bound2, futility=TRUE)
# oc8 <- oc(L, U, theta, sigma, K, n.fix$n1, n.fix$n2, bound3, futility=TRUE, binding=TRUE)
# oc9 <- oc(L, U, theta, sigma, K, bound4$n1minmax, bound4$n2minmax, bound4, futility=TRUE)
# oc10<- oc(L, U, theta, sigma, K, bound5$n1minmax, bound5$n2minmax, bound5,
# futility=TRUE, binding=TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab