plot.2stage: Plot function for 2 stage sample size calculation

Description Usage Arguments Examples

View source: R/plot-2stage.R

Description

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

Usage

1
2
## S3 method for class ''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

1
2
3
4
5
6
7
8
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)

IDDI-BE/PhIIdesign documentation built on June 5, 2021, 2:03 p.m.