Convert Information Target into Sample Size for Fixed N Single-Stage Design
Source:R/information_to_n.R
information_to_n.Rd
These functions convert an information target into an approximate sample size required for a single-stage fixed sample size design with the same power and type I error requirements under assumed values of nuisance parameters.
Usage
information_to_n_difference_means(
information,
sigma_0,
sigma_1,
round_up = TRUE
)
information_to_n_risk_difference(
information,
pi_0 = NULL,
pi_1 = NULL,
delta = NULL,
round_up = TRUE
)
information_to_n_relative_risk(
information,
pi_0 = NULL,
pi_1 = NULL,
rr = NULL,
round_up = TRUE
)
information_to_events_log_hr(
information,
allocation_ratio = 1,
round_up = TRUE
)
Arguments
- information
Numeric vector containing the information level
- sigma_0
Variance of outcomes in the population of individuals receiving the control intervention
- sigma_1
Variance of outcomes in the population of individuals receiving the active intervention
- round_up
Logical scalar: should the sample size be rounded up to an integer value?
- pi_0
Probability of event in the population of individuals receiving the control intervention
- pi_1
Probability of event in the population of individuals receiving the control intervention
- delta
The risk difference (i.e.
pi_1 - pi_0
)- rr
The relative risk of the event in treatment vs. control (i.e.
pi_1/pi_0
)- allocation_ratio
The allocation ratio of participants receiving treatment to those receiving control
Value
When all parameters are scalars, the result is a scalar, indicating the approximate sample size requirement. When multiple values are specified, a grid of unique parameters are constructed, and the approximate information is computed for each value of the parameters.
Details
The amount of information in a sample of size \(N\) depends on nuisance parameters, such as the variance of continuous outcomes, the risk of binary and time-to-event outcomes, rates of misssing data, and the correlation between covariates and the outcomes of interest.
In studies with a fixed sample size, this sample size is chosen based on assumptions about these nuisance parameters, which are incorporated into the effect size. The sample size is chosen to give power \((1 - \beta)\) while maintaining a type I error rate of \((\alpha)\) under some assumed effect size. Inaccurate estimates of nuisance parameters can lead to over-powered or under-powered studies.
In an information-monitored design, investigators choose an estimand of interest, such as the difference in means or proportions, that is free from nuisance parameters. A trial is designed to identify some minimum important difference \(\delta_{min}\) in the estimand with power \((1 - \beta)\) while maintaining a type I error rate of \((\alpha)\). Data is collected until the precision of the estimate (i.e. the reciprocal of its variance) reaches a pre-specified threshold \(\mathcal{I}\):
$$\mathcal{I} = \left(\frac{Z_{\alpha/s} + Z_{\beta}}{\delta_{min}}\right)^2 \approx \frac{1}{Var(\hat{\delta})} = \frac{1}{\left(SE(\hat{\delta})\right)^2}$$
The sample size required to reach the information target \(\mathcal{I}\) depends on nuisance parameters mentioned above.
These functions allow a user to determine an approximate sample size \(N\) at which the information target \(\mathcal{I}\) would be reached under some assumptions about the nuisance parameters.
References
Mehta, CR, and Tsiatis AA. 2001. "Flexible Sample Size Considerations Using Information-Based Interim Monitoring". Drug Information Journal 35 (4): 1095–1112. https://doi.org/10.1177/009286150103500407
See also
asymptotic_information_difference_means, asymptotic_information_difference_proportions, asymptotic_information_relative_risk, asymptotic_information_mann_whitney_fm, and asymptotic_information_logrank for an asymptotic approximation of the information for a given sample size and values of the nuisance parameters, and required_information_single_stage for determining the information target.
Examples
information_to_n_difference_means(
information =
required_information_single_stage(
delta = 5,
power = 0.8,
alpha = 0.05,
sides = 2
),
sigma_0 = 10,
sigma_1 = 10,
round_up = TRUE
)
#> n_per_arm n_total
#> 1 63 126
power.t.test(
delta = 5, sd = 10, sig.level = 0.05, power = 0.8
)
#>
#> Two-sample t test power calculation
#>
#> n = 63.76576
#> delta = 5
#> sd = 10
#> sig.level = 0.05
#> power = 0.8
#> alternative = two.sided
#>
#> NOTE: n is number in *each* group
#>
information_to_n_risk_difference(
information =
required_information_single_stage(
delta = 0.1,
power = 0.8,
alpha = 0.05,
sides = 2
),
pi_0 = 0.25,
pi_1 = 0.15,
round_up = TRUE
)
#> n_per_arm n_total
#> 1 248 496
power.prop.test(p1 = 0.25, p2 = 0.15, sig.level = 0.05, power = 0.8)
#>
#> Two-sample comparison of proportions power calculation
#>
#> n = 249.982
#> p1 = 0.25
#> p2 = 0.15
#> sig.level = 0.05
#> power = 0.8
#> alternative = two.sided
#>
#> NOTE: n is number in *each* group
#>
information_to_n_relative_risk(
information =
required_information_single_stage(
delta = log(0.5),
power = 0.8,
alpha = 0.05,
sides = 2
),
pi_0 = 0.2,
pi_1 = 0.1,
round_up = TRUE
)
#> n_per_arm n_total
#> 1 213 426
rr_design(
pi_1 = 0.1,
pi_0 = 0.2,
power = 0.8,
alpha = 0.05
)
#> n_per_arm n_total
#> 1 212.3734 424.7468
information_to_events_log_hr(
information =
required_information_single_stage(
delta = log(0.5),
power = 0.8,
alpha = 0.05,
sides = 2
),
allocation_ratio = 1,
round_up = TRUE
)
#> [1] 66
hr_design(
hazard_ratio = 0.5,
power = 0.8,
alpha = 0.05,
test_sides = 2
)
#> [1] 65.34566