# Simulated CE plane data
set.seed(42)
n <- 3000
inc_qaly <- rnorm(n, 2.5, 0.8)
inc_cost <- inc_qaly * 1.65e5 + rnorm(n, 0, 2e5)
ce_at_threshold <- inc_cost <= 170000 * inc_qaly
ce_data <- data.frame(inc_qaly, inc_cost, ce_at_threshold)
ggplot(ce_data, aes(x = inc_qaly, y = inc_cost, colour = ce_at_threshold)) +
geom_point(alpha = 0.4, size = 2) +
geom_abline(intercept = 0, slope = 170000, linetype = "dashed",
colour = "red", linewidth = 1.2) +
annotate("text", x = 3.5, y = 450000, label = "WTP threshold\n₹1,70,000/QALY",
colour = "red", size = 3.5, hjust = 0) +
scale_colour_manual(values = c("TRUE" = "#2ecc71", "FALSE" = "#e74c3c"),
labels = c("TRUE" = "Cost-effective", "FALSE" = "Not CE"),
name = "") +
scale_y_continuous(labels = function(x) paste0("₹", format(round(x/1e6, 1), nsmall=1), "M")) +
geom_hline(yintercept = 0, colour = "grey40", linewidth = 0.4) +
geom_vline(xintercept = 0, colour = "grey40", linewidth = 0.4) +
annotate("text", x = 4, y = -3e5, label = "DOMINANT\n(cheaper + better)",
colour = "#2ecc71", size = 3, fontface = "bold") +
annotate("text", x = -0.5, y = 6e5, label = "DOMINATED",
colour = "#e74c3c", size = 3, fontface = "bold") +
labs(x = "Incremental QALYs", y = "Incremental Cost (₹)",
title = "CE Plane — 4 Quadrants",
caption = "Each point = one PSA iteration") +
theme_minimal() +
theme(legend.position = "bottom")