Determines the minimum subgroup sample size needed to achieve a target detection probability for a given true hazard ratio.
find_required_sample_size(
theta,
target_power = 0.8,
prop_cens = 0.3,
hr_threshold = 1.25,
hr_consistency = 1,
n_range = c(20L, 500L),
tol = 1,
verbose = TRUE
)A list with:
Minimum sample size (rounded up)
Actual detection probability at n_sg_required
Input hazard ratio
Input target power
Numeric. True hazard ratio in subgroup.
Numeric. Target detection probability (0-1). Default: 0.80
Numeric. Proportion censored. Default: 0.3
Numeric. HR threshold. Default: 1.25
Numeric. HR consistency threshold. Default: 1.0
Integer vector of length 2. Range of sample sizes to search. Default: c(20, 500)
Numeric. Tolerance for bisection search. Default: 1
Logical. Print progress. Default: TRUE