Skip to contents

In information monitored designs, data are accrued until the information (i.e. precision) reaches the level required to achieve the desired power when testing the null hypothesis against a specific alternative while maintaining a specified Type I Error Rate. required_information_uninflated_mann_whitney is an alias to required_information_single_stage for ordinal outcomes, where the null value of the Mann-Whitney estimand is 0.5.

Usage

required_information_single_stage(
  delta,
  delta_0 = 0,
  alpha = 0.05,
  sides = 2,
  power = 0.8
)

required_information_mw_single_stage(mw, alpha = 0.05, sides = 2, power = 0.8)

Arguments

delta

Numeric vector containing the estimand under the alternative hypothesis

delta_0

Numeric vector containing the estimand under the null hypothesis

alpha

Desired Type I Error Rate of the test

sides

(Scalar - 1 or 2): Type of Test, either 1-sided or 2-sided.

power

Desired power of the test (1 - Type II Error Rate)

mw

Numeric vector containing the estimand under the alternative hypothesis: the value of the Mann-Whitney under the null is always 0.5.

Value

When all parameters are scalars, the result is a scalar, indicating the required information. When multiple values are specified, a grid of unique parameters are constructed, and the required information is computed for each value of the parameters.

See also

rpact::getDesignGroupSequential() for planning multi-stage designs, and required_information_sequential() for adjusting the information level from a single stage design to a multi-stage design.

Examples

# When a single value is supplied for each parameter, a scalar is returned:
required_information_single_stage(
  delta = 5,
  delta_0 = 0,
  alpha = 0.05,
  sides = 2,
  power = 0.8
)
#> [1] 0.3139552

# When multiple values are supplied for one or more parameters, the grid of
# parameters are created, and a data.frame is returned.
required_information_single_stage(
  delta = c(5, 7.5),
  delta_0 = 0,
  alpha = 0.05,
  sides = 2,
  power = c(0.8, 0.9)
)
#>   delta delta_0 alpha sides power information
#> 1   5.0       0  0.05     2   0.8   0.3139552
#> 2   7.5       0  0.05     2   0.8   0.1395356
#> 3   5.0       0  0.05     2   0.9   0.4202969
#> 4   7.5       0  0.05     2   0.9   0.1867986