designPilotSafeT | R Documentation |
Designs a safe experiment for a prespecified tolerable type I error based on planned sample size(s), which are fixed ahead of time. Outputs a list that includes the deltaS, i.e., the safe test defining parameter.
designPilotSafeT( nPlan = 50, alpha = 0.05, alternative = c("twoSided", "greater", "less"), h0 = 0, lowParam = 0.01, highParam = 1.2, tol = 0.01, inverseMethod = TRUE, logging = FALSE, paired = FALSE, maxIter = 10 )
nPlan |
the planned sample size(s). |
alpha |
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. |
alternative |
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less". |
h0 |
a number indicating the hypothesised true value of the mean under the null. For the moment h0=0. |
lowParam |
numeric defining the smallest delta of the search space for the test-defining deltaS for scenario 3. Currently not yet in use. |
highParam |
numeric defining the largest delta of the search space for the test-defining deltaS for scenario 3. Currently not yet in use. |
tol |
a number that defines the stepsizes between the lowParam and highParam. |
inverseMethod |
logical, always |
logging |
logical, if |
paired |
logical, if |
maxIter |
numeric > 0, the maximum number of iterations of adjustment to the candidate set from lowParam to highParam, if the minimum is not found. |
Returns an object of class 'safeDesign'. An object of class 'safeDesign' is a list containing at least the following components:
the planned sample size(s).
the safe test defining parameter. Here deltaS.
the minimal clinically relevant standardised effect size provided by the user.
the tolerable type I error provided by the user.
the tolerable type II error provided by the user.
any of "twoSided", "greater", "less" provided by the user.
any of "oneSample", "paired", "twoSample" provided by the user.
logical, TRUE
if "paired", FALSE
otherwise.
the specified hypothesised value of the mean or mean difference depending on whether it was a one-sample or a two-sample test.
default is 1. Different from 1, whenever testType equals "twoSample", then it defines ratio between the planned randomisation of condition 2 over condition 1.
the smallest n of the search space for n provided by the user.
the largest n of the search space for n provided by the user.
the smallest delta of the search space for delta provided by the user.
the largest delta of the search space for delta provided by the user.
the step size between lowParam and highParam provided by the user.
FALSE
(default) specified by the user to indicate that the design is not a pilot study.
the expression with which this function is called.
designPilotSafeT(nPlan=30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.