Plot method for MAMS objects
plot.MAMS.Rd
produces as plot of the boundaries.
Usage
# S3 method for class 'MAMS'
plot(
x,
ask = TRUE,
which = 1:2,
new = TRUE,
col = NULL,
pch = NULL,
lty = NULL,
main = NULL,
xlab = "Analysis",
ylab = "Test statistic",
ylim = NULL,
type = NULL,
las = 1,
...
)
Arguments
- x
An output object of class MAMS
- ask
A logical indicating if R should wait for the next plot to be displayed.
- which
A vector indicating which plot(s) to define.
1
displays the efficacy and futility limits per stage,2
displays the efficacy nd futility probabilities per stage,1:2
(default) displays both.- new
A logical indicating if the new plot of the futility and efficacy limits should be displayed (default=`TRUE“).
- col
A specification for the default plotting color (default=
NULL
). Seepar
for more details.- pch
Either an integer specifying a symbol or a single character to be used as the default in plotting points (default=
NULL
). Seepar
for more details.- lty
A specification for the default line type to be used between analyses (default=
NULL
). Setting to zero suppresses plotting of the lines. Seepar
for more details.- main
An overall title for the plot (default=
NULL
).- xlab
A title for the x axis (default=
"Analysis"
).- ylab
A title for the y axis (default=`"Test statistic"“).
- ylim
A title for the y axis (default=
"Test statistic"
).- type
Type of plot to be used (default=
NULL
). Seeplot
for more details.- las
A specification of the axis labeling style. The default
1
ensures the labels are always horizontal. See?par
for details.- ...
Further arguments passed to or from other methods.
Examples
# \donttest{
# 2-stage design with triangular boundaries
res <- mams(K=4, J=2, alpha=0.05, power=0.9, r=1:2, r0=1:2,
p=0.65, p0=0.55, ushape="triangular", lshape="triangular", nstart=30)
#>
#> i) find lower and upper boundaries
#>
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#>
#> ii) define alpha star
#> iii) perform sample size calculation
#> (maximum iteration number = 259)
#>
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> 50
#>
#>
#> iv) run simulation
plot(res)
# }