View source: R/waldtype_power.R
| power_RET | R Documentation | 
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,
  ...
)
experiment | 
 a numeric vector specifying the parameters of the experimental treatment group in the alternative hypothesis  | 
reference | 
 a numeric vector specifying the parameters of the reference treatment group in the alternative hypothesis  | 
placebo | 
 a numeric vector specifying the parameters of the placebo treatment group in the alternative hypothesis  | 
Delta | 
 a numeric value specifying the non-inferiority/superiority margin  | 
sig_level | 
 A numeric value specifying the significance level (type I error probability)  | 
power | 
 A numeric value specifying the target power (1 - type II error probability)  | 
n | 
 The total sample size. Needs to be at least 7.  | 
allocation | 
 A (non-empty) vector specifying the sample size allocation (nExp/n, nRef/n, nPla/n)  | 
distribution | 
 A character specifying the distribution of the endpoints. Must
must be either of   | 
... | 
 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
A list with class "power.htest" containing the following components:
n | 
 The total sample size  | 
power | 
 A numeric value specifying the target power  | 
Delta | 
 A numeric value specifying the non-inferiority or superiority margin.  | 
sig.level | 
 A character string specifying the significance level  | 
type | 
 A character string indicating what type of Wald-type test will be performed  | 
allocation | 
 A vector with the sample size allocation (nExp/n, nRef/n, nPla/n)  | 
sig.level | 
 The significance level (Type I error probability)  | 
nExp | 
 A numeric value specifying the number of sample in the experimental treatment group  | 
nRef | 
 A numeric value specifying the number of sample in the reference treatment group  | 
nPla | 
 A numeric value specifying the number of sample in the placebo treatment group  | 
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.