# \donttest{
# Build a small synthetic dataset with required columns
set.seed(42)
n <- 200
df_ex <- data.frame(
os_time = rexp(n, rate = 0.01),
os_event = rbinom(n, 1, 0.6),
treat = rep(0:1, each = n / 2),
biomarker = rnorm(n),
loghr_po = rnorm(n, mean = -0.3, sd = 0.5)
)
# With threshold - full subgroup analysis
results <- cox_ahr_cde_analysis(
df = df_ex, z_name = "biomarker",
hr_threshold = 1.25, plot_style = "grid",
verbose = FALSE
)
# Without threshold - pure AHR curves
results <- cox_ahr_cde_analysis(
df = df_ex, z_name = "biomarker",
hr_threshold = NULL, plot_select = "ahr_only",
verbose = FALSE
)
# }
Run the code above in your browser using DataLab