Learn R Programming

mratios (version 1.4.2)

n.ratio: Sample size computation in simultaneous tests for ratios of means

Description

Computes the sample sizes required in simultaneous tests for non-inferiority (or superiority) based on relative margins in multiple comparisons with a control.

Usage

n.ratio(m, rho, Power, CV0, rho.star, alpha, Min.power = TRUE)

Arguments

m

number of comparisons with a control group

rho

relative non-inferiority (or superiority) margin

Power

given power (1-beta)

CV0

coefficient of variation of the control group

rho.star

the percentage (of the mean of the control group) to be detected

alpha

familywise error rate

Min.power

if set to TRUE (by default), the minimal power will be controlled, otherwise complete power

Details

The sample sizes are computed at the least favourable configurations, based on the assumption of no prior information regarding the true configuration of the ratios under the alternative hypotheses. The formula is

\( n = ((C_1 + C_2)^2) (1 + \rho^2)/((\rho - \rho^*)^2) CV0^2 \),

where \(C_1\) is the lower \(1-\alpha\) equi-coordinate percentage point of an m-variate normal distribution and \(C_2\) is the quantile of univariate (multivariate) normal distribution depending on the type of power controlled. In tests for non-inferiority (or superiority) with large response values indicating better treatment benefit, \(\rho < \rho^* \), where \(\rho < 1\) for non-inferiority and \(\rho > 1\) for superiority testing. Whereas, if small response values indicate better treatment benefit, \(\rho^* < \rho\), where \(\rho > 1\) for non-inferiority and \(\rho < 1\) for superiority testing.

References

Dilba, G., Bretz, F., Hothorn, L.A., and Guiard, V. (2006). Power and sample size computations in simultaneous tests for non-inferiority based on relative margins. Statistics in Medicine 25, 1131-1147.

Examples

Run this code
# NOT RUN {

  #
  #  Example 1: Sample size calculation in tests for non-inferiority
  #  (two-sample case)(Laster and Johnson (2003),
  #  Statistics in Medicine 22:187-200)

     n.ratio(m=1, rho=0.8, Power=0.8, CV0=0.75, rho.star=1,
     alpha=0.05)


  #
  #  Example 2: Sample size calculation in simultaneous tests for
  #  non-inferiority
  #  (Dilba et al. (2006), Statistics in Medicine 25:1131-1147)

     n.ratio(m=3, rho=0.7, Power=0.8, CV0=0.5, rho.star=0.95,
     alpha=0.05)


  #
  #  Example 3: Controlling complete power
  #

     n.ratio(m=5, rho=1.2, Power=0.8, CV0=0.2, rho.star=1.40,
         alpha=0.05, Min.power=FALSE)

# }

Run the code above in your browser using DataLab