|
a |
|
b/overview/calibration-plots.R |
|
|
1 |
source('../lib/handymedical.R', chdir = TRUE) |
|
|
2 |
requirePlus('ggplot2', 'cowplot') |
|
|
3 |
|
|
|
4 |
cox.calibration <- |
|
|
5 |
read.csv('../../output/cox-bigdata-varsellogrank-01-calibration-table.csv') |
|
|
6 |
rf.calibration <- |
|
|
7 |
read.csv('../../output/rfsrc-cv-nsplit-try3-calibration-table.csv') |
|
|
8 |
|
|
|
9 |
cox.calibration.plot <- calibrationPlot(cox.calibration, max.points = 2000) |
|
|
10 |
rf.calibration.plot <- calibrationPlot(rf.calibration, max.points = 2000) |
|
|
11 |
|
|
|
12 |
plot_grid( |
|
|
13 |
cox.calibration.plot, rf.calibration.plot, |
|
|
14 |
labels = c("C", ""), |
|
|
15 |
align = "v", ncol = 2 |
|
|
16 |
) |
|
|
17 |
|
|
|
18 |
ggsave( |
|
|
19 |
'../../output/models-calibration-eg.pdf', |
|
|
20 |
width = 16, |
|
|
21 |
height = 8, |
|
|
22 |
units = 'cm', |
|
|
23 |
useDingbats = FALSE |
|
|
24 |
) |