opt_alloc_RET: Optimal sample size for three-arm trials when analyzed with a...

View source: R/waldtype_optAlloc.R

opt_alloc_RETR Documentation

Optimal sample size for three-arm trials when analyzed with a Wald-type test

Description

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

Usage

opt_alloc_RET(experiment, reference, placebo, Delta, distribution, h = NULL)

Arguments

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 "poisson", "negbin", "exponential", "normal"

h

Function measuring the efficacy; used to defined hypothesis

Details

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.

Value

Vector with optimal sample size allocation in the order (experiment, reference, placebo)

Examples

opt_alloc_RET(experiment = 1,
              reference = 1,
              placebo = 3,
              Delta = 0.8,
              distribution = "poisson")


ThreeArmedTrials documentation built on Dec. 28, 2022, 2:06 a.m.