Plot method for
Returns two interactive
plotly plots (if plotly=TRUE)
or two static
ggplot2 plots (if plotly=FALSE) to compare results
from various designs generated from a call to
based on various criteria, and to assist in selecting an optimal design.
an object of class 'calibrate_thresholds', usually returned by the
a vector specifying the minimum and maximum acceptable type I error. Specify c(0, 1) to return the full range of resulting type I error. Defaults to c(0, 1)
a numeric between 0 and 1 specifying the minimum acceptable power. Specify 0 to return the full range of resulting power. Defaults to 0.
a logical indicator of whether you want the plots returned as interactive plotly plots or non-interactive ggplots. Defaults to FALSE.
Plots of the average sample size under the null by the average
sample size under the alternative, and the type I error by the power for
designs meeting the specified
# Setting S = 50 and nsim = 50 for speed # In practice you would want a much larger sample and more simulations set.seed(123) # One-sample case cal_tbl1 <- calibrate_thresholds( p_null = 0.1, p_alt = 0.4, n = seq(5, 15, 5), N = 15, pp_threshold = c(0.85, 0.9), ppp_threshold = c(0.1, 0.2), S = 10, nsim = 10 ) #> Joining, by = c("sim_num", "pp_threshold", "ppp_threshold") plot(cal_tbl1, type1_range = c(0.01, 0.2), minimum_power = 0.7)