set.seed(123)
# Setting S = 100 for speed, in practice you would want a much larger sample
# One-sample case
sim_single_trial(
p = 0.3,
n = c(5, 10),
p0 = 0.1,
N = 25,
S = 100
)
# Two-sample case
sim_single_trial(
p = c(0.1, 0.3),
n = cbind(c(5, 10), c(5, 10)),
p0 = NULL,
N = c(50, 50),
delta = 0,
S = 100
)
Run the code above in your browser using DataLab