#balanced design
yb <- c(1,0,1,1,1,0,1)
ya <- c(1,0,1,0,0,0,1)
safeDesign <- designSafeTwoProportions(na = 1,
nb = 1,
beta = 0.20,
delta = 0.6,
alternativeRestriction = "none",
M = 1e1)
safeTwoProportionsTest(ya = ya, yb = yb, designObj = safeDesign)
#pilot
safeTwoProportionsTest(ya = ya, yb = yb, pilot = TRUE)
#unbalanced design
yb <- c(1,0,1,1,1,0,1)
ya <- c(2,2,1,2,0,2,2)
safeDesign <- designSafeTwoProportions(na = 2,
nb = 1,
beta = 0.20,
delta = 0.6,
alternativeRestriction = "none",
M = 1e1)
safeTwoProportionsTest(ya = ya, yb = yb, designObj = safeDesign)
Run the code above in your browser using DataLab