Helper function: Computes the type II error of the safeTTest based on the minimal clinically relevant standardised mean difference and nPlan.
computeBetaSafeT(
deltaMin,
nPlan,
alpha = 0.05,
alternative = c("twoSided", "greater", "less"),
testType = c("oneSample", "paired", "twoSample"),
seed = NULL,
parameter = NULL,
pb = TRUE,
nSim = 1000L,
nBoot = 1000L
)a list which contains at least beta and an adapted bootObject of class
boot.
numeric that defines the minimal relevant standardised effect size, the smallest effect size that we would the experiment to be able to detect.
vector of max length 2 representing the planned sample sizes.
numeric in (0, 1) that specifies the tolerable type I error control --independent of n-- that the designed test has to adhere to. Note that it also defines the rejection rule e10 > 1/alpha.
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less".
either one of "oneSample", "paired", "twoSample".
integer, seed number.
optional test defining parameter. Default set to NULL.
logical, if TRUE, then show progress bar.
integer > 0, the number of simulations needed to compute power or the number of samples paths for the safe z test under continuous monitoring.
integer > 0 representing the number of bootstrap samples to assess the accuracy of approximation of the power, the number of samples for the safe z test under continuous monitoring, or for the computation of the logarithm of the implied target.
computeBetaSafeT(deltaMin=0.7, 27, nSim=10)
Run the code above in your browser using DataLab