
Plot function for 'BATSS' outputs
plot.batss.RdPlot for objects of class 'batss'
Arguments
- x
An object of class 'batss' (i.e., output of the function batss.glm).
- which
An integer vector indicating the list of desired plots. If a subset of the plots is required, specify a subset of the numbers
1:4. By default, all plots are provided, i.e.,which=1:4. Plot1displays the boxplot of the total sample size as well as the boxplot of the sample sizes per group, Plot2displays a barplot of the probability of stopping at each look, plot3displays the violin plot of the sample size per group, and plot4displays the Monte Carlo trial target estimates as a function of the sample size.- ask
A logical. If
TRUE, the user is prompted to hit the Enter key before each plot. Seepar(ask=.). The default isask=TRUE.- hypothesis
A character string indicating which alternative hypothesis to use for analyses considering both "H0" and "H1", with options "H1" (default) and "H0".
- title
Either a logical indicating if a title should be added or a string (of class character) indicating the title to be added. If
titleequalsTRUE(default), the title 'Under 'H1' or 'Under 'H0' (depending on the argumenthypothesis) is added to the outer margin of the plot. No outer margin space is added iftitle = FALSE.- legend
A logical (with default set to
TRUE) if a legend should be added at the bottom of plots 3 and 4, or a list with namesheight,cexandptrespectively indicating i/ the fraction of the plot to be used for the legend as a numeric (default is.15), ii/ the character expansion factor relative to currentpar("cex")as a numeric (default to1.25), and iii/ the expansion factor(s) for the points as a numeric (default to2). The inputlegend = TRUEis equivalent tolegend = c(height=.15, cex=1, pt=2).- ess
A logical (with default set to
TRUE) indicating if the expected sample size should be displayed in plots 2, 3 and 4, or a list with namescol,cexandbgrespectively indicating i/ the colour of the label as a character (plots 2, 3, and 4), ii/ the text expension level as a numerical value (plots 2, 3 and 4) and iii/ the background colour as a character (plot 3). The inputess = TRUEis equivalent toess = list(col="blue", cex=1, bg="#FFD70070").- percentage
A logical (with default set to
TRUE) indicating if the probability of stopping at each look should be displayed in plots 2 (as a percentage), or a list with namescol, andcexindicating i/ the colour of the label as a character, ii/ the text expension level as a numerical value. The inputpercentage = TRUEis equivalent topercentage = list(col="violet", cex=1).- beta
A logical (with default set to
TRUE) indicating if the assumed target parameter value(s) should be displayed in plot 4, or a list with namescol,lwd, andltyrespectively indicating i/ the colour of the target parameter value horizontal line(s) as a character, ii/ the thickness of the line(s) as a numerical value and iii/ the type of line as an integer (see par for details). The inputbeta = TRUEis equivalent tobeta = list(col="blue", lwd=1.5, lty=1).- col
A vector of length 4 specifying the colours to be used. Default to
c("#8B897040","#008B0040","#8B3A3A40","#FF990075")where the last two digits of the hexadecimal strings specify the level of transparency. Refer to the Section 'colour specification' in par for details. If the length ofcolequals 1, the same colour is used for all cases. For plots1and2, the 3rd colour of the vectorcolis used to display the barplot and boxplots.- smooth
A numerical (>0) indictating the level of smoothing of the violin plots (for plot
3). Default to1. Whensmooth=NULL, the smoothing value is optimised in the sm.density function.- ...
Additional arguments affecting the plot produced, like ylim and ylab.
See also
batss.glm(), batss.surv(), the function generating S3 objects of class 'batss'.