Simulate stopping times for the safe z-test
sampleStoppingTimesSafeT(
deltaTrue,
alpha = 0.05,
alternative = c("twoSided", "less", "greater"),
testType = c("oneSample", "paired", "twoSample"),
nSim = 1000L,
nMax = 1000,
ratio = 1,
lowN = 3L,
parameter = NULL,
seed = NULL,
wantEValuesAtNMax = FALSE,
pb = TRUE
)a list with stoppingTimes and breakVector. Entries of breakVector are 0, 1. A 1 represents stopping due to exceeding nMax, and 0 due to 1/alpha threshold crossing, which implies that in corresponding stopping time is Inf.
numeric, the value of the true standardised effect size (test-relevant parameter). This argument is used by `designSafeT()` with `deltaTrue <- deltaMin`
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 > 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, maximum sample size of the (first) sample in each sample path.
numeric > 0 representing the randomisation ratio of condition 2 over condition 1. If testType is not equal to "twoSample", or if nPlan is of length(1) then ratio=1.
integer minimal sample size of the (first) sample when computing the power due to optional stopping. Default lowN is set 1.
optional test defining parameter. Default set to NULL.
integer, seed number.
logical. If TRUE then compute eValues at nMax. Default FALSE.
logical, if TRUE, then show progress bar.
sampleStoppingTimesSafeT(0.7, nSim=10)
Run the code above in your browser using DataLab