sampleStoppingTimesSafeZ | R Documentation |
Simulate stopping times for the safe z-test
sampleStoppingTimesSafeZ( meanDiffMin, alpha = 0.05, alternative = c("twoSided", "less", "greater"), sigma = 1, kappa = sigma, nSim = 1000L, nMax = 1000, ratio = 1, testType = c("oneSample", "paired", "twoSample"), parameter = NULL, wantEValuesAtNMax = FALSE, pb = TRUE )
meanDiffMin |
numeric that defines the minimal relevant mean difference, the smallest population mean that we would like to detect. |
alpha |
numeric in (0, 1) that specifies the tolerable type I error control –independent on n– that the designed test has to adhere to. Note that it also defines the rejection rule e10 > 1/alpha. |
alternative |
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less". |
sigma |
numeric > 0 representing the assumed population standard deviation used for the test. |
kappa |
the true population standard deviation. Default kappa=sigma. |
nSim |
integer > 0, the number of simulations needed to compute power or the number of samples paths for the safe z test under continuous monitoring. |
nMax |
integer > 0, maximum sample size of the (first) sample in each sample path. |
ratio |
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. |
testType |
either one of "oneSample", "paired", "twoSample". |
parameter |
optional test defining parameter. Default set to |
wantEValuesAtNMax |
logical. If |
pb |
logical, if |
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.
sampleStoppingTimesSafeZ(0.7, nSim=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.