Computes detection probability across a range of hazard ratios to create a power-like curve for subgroup detection.
generate_detection_curve(
theta_range = c(0.5, 3),
n_points = 50L,
n_sg,
prop_cens = 0.3,
hr_threshold = 1.25,
hr_consistency = 1,
include_reference = TRUE,
method = "cubature",
verbose = TRUE
)A data.frame with columns:
Hazard ratio values
Detection probability
Subgroup size (repeated)
Censoring proportion (repeated)
Detection threshold (repeated)
Numeric vector of length 2. Range of HR values to evaluate. Default: c(0.5, 3.0)
Integer. Number of points to evaluate. Default: 50
Integer. Subgroup sample size.
Numeric. Proportion censored (0-1). Default: 0.3
Numeric. HR threshold for detection. Default: 1.25
Numeric. HR consistency threshold. Default: 1.0
Logical. Include reference HR values (0.5, 0.75, 1.0). Default: TRUE
Character. Integration method. Default: "cubature"
Logical. Print progress. Default: TRUE