# calibration plot ds <- openxlsx2::read_xlsx("1 PA Decline/Fra DDV/calibration_imp.xlsx") p <- ds |> split(ds$model) |> purrr::imap(\(.x,.i){ .x |> predtools::calibration_plot(obs="y",pred="pred")|> purrr::pluck("calibration_plot")+ ggplot2::ggtitle(.i)+ ggplot2::scale_x_continuous(breaks=seq(0,1,.25),limits=c(0,1))+ ggplot2::scale_y_continuous(breaks=seq(0,1,.25),limits=c(-.1,1.1)) }) |> patchwork::wrap_plots(ncol=2) ggplot2::ggsave(filename = "1 PA Decline/calibration_imp.pdf", plot=p, units = "mm", width = 200, height = 100, # pointsize = 30, dpi = 1200)