-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4_plots_binary.R
73 lines (51 loc) · 2.13 KB
/
4_plots_binary.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
library(tidyverse)
library(gridExtra)
library(cowplot)
source("4_plot_helper_functions.R")
dwbin <- dwbin <- .6
axis_title_size <- 12
axis_text_size <- 11
strip_text_size <- 12
subtitle_size <- 12
legend_size <- 13
legend_icon_size <- 2
legend_dot_size <- 3.5
results_binary <- readRDS("results/results_irgtt_binary.rds") %>%
filter(treatment_arm_clusters > 12) %>%
mutate(style = "irgtt")
bin_complex <- summarize_logit(results_binary,
version = "complex_covars")
plot1 <- make_grid_plot(bin_complex, continuous = F)
ggsave(plot = plot1, dpi = 300,
width = 10, height = 10,
filename = "irgtt_complex_binary.pdf")
bin_main_terms <- summarize_logit(results_binary,
version = "main_terms")
ggsave(plot = make_grid_plot(bin_main_terms, continuous = F), dpi = 300,
width = 10, height = 10,
filename = "irgtt_main_terms_binary.pdf")
bin_overfit <- summarize_logit(results_binary,
version = "overfit")
ggsave(plot = make_grid_plot(bin_overfit, continuous = F), dpi = 300,
width = 10, height = 10,
filename = "irgtt_overfit_binary.pdf")
################################
strip_text_size <- 9
results_binary_ub <- readRDS("results/results_irgtt_binary_unbalanced.rds") %>%
mutate(style = "unbalanced")
bin_complex_ub <- summarize_logit(results_binary_ub,
version = "complex_covars")
plot1_ub <- make_grid_plot(bin_complex_ub, continuous = F)
ggsave(plot = plot1_ub, dpi = 300,
width = 10, height = 10,
filename = "irgtt_complex_binary_ub.pdf")
bin_main_terms_ub <- summarize_logit(results_binary_ub,
version = "main_terms")
ggsave(plot = make_grid_plot(bin_main_terms_ub, continuous = F), dpi = 300,
width = 10, height = 10,
filename = "irgtt_main_terms_binary_ub.pdf")
bin_overfit_ub <- summarize_logit(results_binary_ub,
version = "overfit")
ggsave(plot = make_grid_plot(bin_overfit_ub, continuous = F), dpi = 300,
width = 10, height = 10,
filename = "irgtt_overfit_binary_ub.pdf")