#plan for an experiment to detect minimal difference of 0.6 with a balanced design
set.seed(3152021)
designSafeTwoProportions(na = 1,
nb = 1,
alpha = 0.1,
beta = 0.20,
delta = 0.6,
alternativeRestriction = "none",
M = 75)
#safe analysis of a pilot: number of samples already known
designSafeTwoProportions(na = 1,
nb = 1,
nBlocksPlan = 20,
pilot = TRUE)
#specify own hyperparameters
hyperParameterValues <- list(betaA1 = 10, betaA2 = 1, betaB1 = 1, betaB2 = 10)
designSafeTwoProportions(na = 1,
nb = 1,
alpha = 0.1,
beta = 0.20,
delta = 0.6,
hyperParameterValues = hyperParameterValues,
alternativeRestriction = "none",
M = 75)
#restrict range of proportions for estimating nPlan in the control group
designSafeTwoProportions(na = 1,
nb = 1,
beta = 0.20,
delta = 0.3,
alternativeRestriction = "none",
M = 75,
simThetaAMin = 0.1, simThetaAMax = 0.2)
Run the code above in your browser using DataLab