View source: R/waldtype_optAlloc.R
opt_alloc_RET | R Documentation |
Calculate optimal sample size allocation for Wald-type test for superiority or non-inferiority of the experimental treatment versus reference treatment with respect to placebo
opt_alloc_RET(experiment, reference, placebo, Delta, distribution, h = 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 |
distribution |
a character specifying the distribution of the endpoints. Must
must be either of |
h |
Function measuring the efficacy; used to defined hypothesis |
The arguments experiment
, reference
, and placebo
define
the parameters of the endpoint distribution for the respective groups:
distribution = "poisson"
: experiment
, reference
, and
placebo
must have length one and define the means.
distribution = "negbin"
: experiment
, reference
, and
placebo
must have length two and define the mean in the first entry
and the shape parameter in the second entry.
distribution = "exponential"
: experiment
, reference
, and
placebo
must have length two and define the mean in the first entry
and the probability for an uncensored observation in the second entry.
distribution = "normal"
: experiment
, reference
, and
placebo
must have length two and define the mean in the first entry
and the variance in the second entry.
Vector with optimal sample size allocation in the order (experiment, reference, placebo)
opt_alloc_RET(experiment = 1,
reference = 1,
placebo = 3,
Delta = 0.8,
distribution = "poisson")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.