累積発生率関数

累積発生率関数テンプレート。競合リスクを考慮した発生率。

cumulative-incidence累積発生競合リスク
累積発生率関数

R Code (ggplot2)

library(ggplot2)

# ---- Cumulative Incidence Function ----
# あなたのデータを入力してください
df <- data.frame(
  x = c(),
  y = c()
)

ggplot(df, aes(x = x, y = y)) +
  geom_point(size = 2) +
  geom_line() +
  scale_x_continuous(name = "Time", limits = c(0, 60)) +
  scale_y_continuous(name = "Cumulative Incidence", limits = c(0, 1)) +
  labs(title = "Cumulative Incidence Function") +
  theme_bw(base_size = 14) +
  theme(plot.title = element_text(face = "bold", hjust = 0.5))