Analyzes how the interaction parameter k_inter affects hazard ratios in different populations (overall, harm subgroup, no-harm subgroup).
sensitivity_analysis_k_inter(
k_inter_range = c(-5, 5),
n_points = 21,
plot = TRUE,
...
)A data.frame of class "k_inter_sensitivity" with columns:
Numeric k_inter value
Numeric hazard ratio in harm subgroup
Numeric hazard ratio in no-harm subgroup
Numeric overall hazard ratio
Integer size of harm subgroup
Numeric vector of length 2 specifying the range of k_inter values to analyze. Default is c(-5, 5).
Integer number of points to evaluate within the range. Default is 21.
Logical indicating whether to create visualization plots. Default is TRUE.
Additional arguments passed to generate_aft_dgm_flex.
This function evaluates the hazard ratios at evenly spaced points across the k_inter range. If plot = TRUE, it creates a 4-panel visualization showing:
Harm subgroup HR vs k_inter
All HRs (overall, harm, no-harm) vs k_inter
Ratio of HRs (harm/no-harm) showing effect modification
Table of key values