Compute power, sample size, or level of significance for Wald-type test for non-inferiority or superiority of the experimental treatment versus reference treatment with respect to placebo.
power_RET(
experiment,
reference,
placebo,
Delta,
sig_level = NULL,
power = NULL,
n = NULL,
allocation = c(1/3, 1/3, 1/3),
distribution = NULL,
...
)
A list with class "power.htest" containing the following components:
The total sample size
A numeric value specifying the target power
A numeric value specifying the non-inferiority or superiority margin.
A character string specifying the significance level
A character string indicating what type of Wald-type test will be performed
A vector with the sample size allocation (nExp/n, nRef/n, nPla/n)
The significance level (Type I error probability)
A numeric value specifying the number of sample in the experimental treatment group
A numeric value specifying the number of sample in the reference treatment group
A numeric value specifying the number of sample in the placebo treatment group
a numeric vector specifying the parameters of the experimental treatment group in the alternative hypothesis
a numeric vector specifying the parameters of the reference treatment group in the alternative hypothesis
a numeric vector specifying the parameters of the placebo treatment group in the alternative hypothesis
a numeric value specifying the non-inferiority/superiority margin
A numeric value specifying the significance level (type I error probability)
A numeric value specifying the target power (1 - type II error probability)
The total sample size. Needs to be at least 7.
A (non-empty) vector specifying the sample size allocation (nExp/n, nRef/n, nPla/n)
A character specifying the distribution of the endpoints. Must
must be either of "binary"
, "poisson"
, "negbin"
, "exponential"
, "normal"
Further arguments. See details.
If the individual group sample sizes, i.e. n*allocation
are not natural number, the parameters n and allocation
will be re-calculated.
The additional parameter var_estimation
is a character string
specifying how the variance for the Wald-type test statistic is estimated
in the Poisson and negative binomial model. Must be RML for restricted
maximum-likelihood, or ML for unrestricted maximum-likelihood
power_RET(experiment = 15, reference = 17, placebo = 20,
Delta = 0.8, sig_level = 0.025, power = 0.8,
allocation = c(1, 1, 1) / 3,
var_estimation = "RML",
distribution = "poisson")
Run the code above in your browser using DataLab