# \donttest{
# Simulate data
set.seed(123)
df <- data.frame(
os_time = rexp(500, 0.01),
os_event = rbinom(500, 1, 0.7),
treat = rbinom(500, 1, 0.5),
bm = rnorm(500, 50, 10)
)
# Fit model
result <- cox_cs_fit(df, z_name = "bm", alpha = 0.20)
# Custom plotting
result <- cox_cs_fit(
df,
z_name = "bm",
plot_params = list(
xlab = "Biomarker Level",
main_title = "Treatment Effect by Biomarker",
cex_legend = 1.2
)
)
# }
Run the code above in your browser using DataLab