computeBetaBatchSafeZ {safestats} | R Documentation |
Helper function: Computes the type II error based on the minimal clinically relevant effect size and sample size.
Description
Helper function: Computes the type II error based on the minimal clinically relevant effect size and sample size.
Usage
computeBetaBatchSafeZ(
meanDiffMin,
nPlan,
alpha = 0.05,
sigma = 1,
kappa = sigma,
alternative = c("twoSided", "greater", "less"),
testType = c("oneSample", "paired", "twoSample"),
parameter = NULL
)
Arguments
meanDiffMin |
numeric that defines the minimal relevant mean difference, the smallest population mean that we would like to detect. |
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. |
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. |
kappa |
the true population standard deviation. Default kappa=sigma. |
alternative |
a character string specifying the alternative hypothesis must be one of "twoSided" (default), "greater" or "less". |
testType |
either one of "oneSample", "paired", "twoSample". |
parameter |
optional test defining parameter. Default set to |
Value
numeric that represents the type II error