designPilotSafeZ | 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 phiS, i.e., the safe test defining parameter.
designPilotSafeZ( nPlan, alternative = c("twoSided", "greater", "less"), alpha = 0.05, sigma = 1, h0 = 0, kappa = sigma, tol = 1e-05, paired = FALSE, parameter = NULL )
nPlan |
optional numeric vector of length at most 2. When provided, it is used to find the safe test defining parameter phiS. Note that if the purpose is to plan based on nPlan alone, then both meanDiffMin and beta should be set to NULL. |
alternative |
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less". |
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. |
sigma |
numeric > 0 representing the assumed population standard deviation used for the test. |
h0 |
numeric, represents the null hypothesis, default h0=0. |
kappa |
the true population standard deviation. Default kappa=sigma. |
tol |
a number that defines the stepsizes between the lowParam and highParam. |
paired |
logical, if |
parameter |
optional test defining parameter. Default set to |
Returns a 'safeDesign' object
the sample size(s) to plan for. Provided by the user.
the safe test defining parameter. Here phiS.
NULL
no minimally clinically relevant effect size provided.
the tolerable type I error provided by the user.
NULL
, no tolerable type II error specified.
any of "twoSided", "greater", "less" provided by the user.
any of "oneSample", "paired", "twoSample" effectively provided by the user.
logical, TRUE
if "paired", FALSE
otherwise.
the assumed population standard deviation used for the test provided by the user.
the true population standard deviation, typically, sigma=kappa.
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 step size between parameter values in the candidate space.
logical, specifying whether it's a pilot design.
the expression with which this function is called.
designPilotSafeZ(nPlan=30, alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.