Plots the expected sample size under H0 versus the maximum sample size

# S3 method for `2stage`
plot(x, main = "Two-stage Designs", xlab = "Maximum Sample Size N", ylab, ...)

Arguments

x

an object returned by simon2stage or sargent2stage

main

title of the graph, passed on to plot

xlab

x-axis label of the graph, passed on to plot

ylab

y-axis label of the graph, passed on to plot

...

other arguments passed on to plot

Examples

samplesize <- simon2stage(p0 = 0.1, pa = 0.3, alpha = 0.05, beta = 0.2,
                          eps = 0.005, N_min = 1, N_max = 50)
plot(samplesize)


samplesize <- sargent2stage(p0 = 0.1, pa = 0.3, alpha = 0.05, beta = 0.1,
                            eta = 0.8, pi = 0.8,
                            eps = 0.005, N_min = 15, N_max = 30)
plot(samplesize)