diff --git a/extended_data_figs_tabs/Ex_Dat_Fig3.png b/extended_data_figs_tabs/Ex_Dat_Fig3.png new file mode 100644 index 0000000..7a167ee Binary files /dev/null and b/extended_data_figs_tabs/Ex_Dat_Fig3.png differ diff --git a/extended_data_figs_tabs/Ex_Dat_Fig4.png b/extended_data_figs_tabs/Ex_Dat_Fig4.png index 798ee5d..29147a6 100644 Binary files a/extended_data_figs_tabs/Ex_Dat_Fig4.png and b/extended_data_figs_tabs/Ex_Dat_Fig4.png differ diff --git a/extended_data_figs_tabs/Ex_Dat_Fig8.png b/extended_data_figs_tabs/Ex_Dat_Fig8.png new file mode 100644 index 0000000..e2cb146 Binary files /dev/null and b/extended_data_figs_tabs/Ex_Dat_Fig8.png differ diff --git a/r_scripts/7_plot_fig_S3_z_score_regression.R b/r_scripts/7_plot_fig_S3_z_score_regression.R index 78e5e2c..eb98ec5 100644 --- a/r_scripts/7_plot_fig_S3_z_score_regression.R +++ b/r_scripts/7_plot_fig_S3_z_score_regression.R @@ -302,5 +302,5 @@ cowplot::plot_grid(bottom) + # set local directory to save # plot sized for 2 columns -ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig3.tiff'), +ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig3.png'), width = 183, height = 120, units = 'mm') diff --git a/r_scripts/7_plot_fig_S4_robustCheck.R b/r_scripts/7_plot_fig_S4_robustCheck.R index 6f3b6b2..972b48b 100644 --- a/r_scripts/7_plot_fig_S4_robustCheck.R +++ b/r_scripts/7_plot_fig_S4_robustCheck.R @@ -239,9 +239,8 @@ Sstd_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = Sstd_ref, y = Sstd_sens1, colour = 'sens1'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens1, colour = 'sens1'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens1, colour = 'sens1')) + geom_linerange(data = fixed_effects, aes(x = Sstd_ref, ymin = Sstd_sens1_lower, ymax = Sstd_sens1_upper, colour = 'sens1')) + # reference versus case 3 @@ -251,11 +250,10 @@ Sstd_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = Sstd_ref, y = Sstd_sens3, colour = 'sens3'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens3, colour = 'sens3'), - width = 0) + geom_linerange(data = fixed_effects, - aes(x = Sstd_ref, ymin = Sstd_sens3_lower, ymax = Sstd_sens3_upper, colour = 'sens3')) + + aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens3, colour = 'sens3')) + + geom_linerange(data = fixed_effects, + aes(x = Sstd_ref, ymin = Sstd_sens3_lower, ymax = Sstd_sens3_upper, colour = 'sens3')) + # reference versus case 8 geom_point(data = study_coefs, aes(x = Sstd_ref, y = Sstd_sens4, colour = 'sens8'), @@ -263,23 +261,21 @@ Sstd_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = Sstd_ref, y = Sstd_sens4, colour = 'sens8'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens4, colour = 'sens8'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens4, colour = 'sens8')) + geom_linerange(data = fixed_effects, aes(x = Sstd_ref, ymin = Sstd_sens4_lower, ymax = Sstd_sens4_upper, colour = 'sens8')) + - # reference versus case 11 +# reference versus case 11 geom_point(data = study_coefs, aes(x = Sstd_ref, y = Sstd_sens5, colour = 'sens11'), alpha = 0.3) + geom_point(data = fixed_effects, aes(x = Sstd_ref, y = Sstd_sens5, colour = 'sens11'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens5, colour = 'sens11'), - width = 0) + geom_linerange(data = fixed_effects, - aes(x = Sstd_ref, ymin = Sstd_sens5_lower, ymax = Sstd_sens5_upper, colour = 'sens11')) + + aes(xmin = Sstd_ref_lower, xmax = Sstd_ref_upper, y = Sstd_sens5, colour = 'sens11')) + + geom_linerange(data = fixed_effects, + aes(x = Sstd_ref, ymin = Sstd_sens5_lower, ymax = Sstd_sens5_upper, colour = 'sens11')) + # 1:1 line and zero lines geom_abline(intercept = 0, slope = 1, lty = 2) + # geom_vline(xintercept = 0, lty = 2) + @@ -307,9 +303,8 @@ Nstd_robust <- geom_point(data = fixed_effects, aes(x = Nstd_ref, y = Nstd_sens1, colour = 'sens11'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens1, colour = 'sens1'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens1, colour = 'sens1')) + geom_linerange(data = fixed_effects, aes(x = Nstd_ref, ymin = Nstd_sens1_lower, ymax = Nstd_sens1_upper, colour = 'sens1')) + # reference versus case 3 @@ -319,9 +314,8 @@ Nstd_robust <- geom_point(data = fixed_effects, aes(x = Nstd_ref, y = Nstd_sens3, colour = 'sens3'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens3, colour = 'sens3'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens3, colour = 'sens3')) + geom_linerange(data = fixed_effects, aes(x = Nstd_ref, ymin = Nstd_sens3_lower, ymax = Nstd_sens3_upper, colour = 'sens3')) + # reference versus case 8 @@ -331,9 +325,8 @@ Nstd_robust <- geom_point(data = fixed_effects, aes(x = Nstd_ref, y = Nstd_sens4, colour = 'sens8'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens4, colour = 'sens8'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens4, colour = 'sens8')) + geom_linerange(data = fixed_effects, aes(x = Nstd_ref, ymin = Nstd_sens4_lower, ymax = Nstd_sens4_upper, colour = 'sens8')) + # reference versus case 11 @@ -343,9 +336,8 @@ Nstd_robust <- geom_point(data = fixed_effects, aes(x = Nstd_ref, y = Nstd_sens5, colour = 'sens11'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens5, colour = 'sens11'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = Nstd_ref_lower, xmax = Nstd_ref_upper, y = Nstd_sens5, colour = 'sens11')) + geom_linerange(data = fixed_effects, aes(x = Nstd_ref, ymin = Nstd_sens5_lower, ymax = Nstd_sens5_upper, colour = 'sens11')) + # 1:1 line and zero lines @@ -380,9 +372,8 @@ S_PIE_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = S_PIE_ref, y = S_PIE_sens1, colour = 'sens1'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens1, colour = 'sens1'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens1, colour = 'sens1')) + geom_linerange(data = fixed_effects, aes(x = S_PIE_ref, ymin = S_PIE_sens1_lower, ymax = S_PIE_sens1_upper, colour = 'sens1')) + # reference versus case 3 @@ -392,7 +383,7 @@ S_PIE_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = S_PIE_ref, y = S_PIE_sens3, colour = 'sens3'), size = 2) + - geom_errorbarh(data = fixed_effects, + geom_linerange(data = fixed_effects, aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens3, colour = 'sens3'), width = 0) + geom_linerange(data = fixed_effects, @@ -404,9 +395,8 @@ S_PIE_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = S_PIE_ref, y = S_PIE_sens4, colour = 'sens8'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens4, colour = 'sens8'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens4, colour = 'sens8')) + geom_linerange(data = fixed_effects, aes(x = S_PIE_ref, ymin = S_PIE_sens4_lower, ymax = S_PIE_sens4_upper, colour = 'sens8')) + # reference versus case 11 @@ -416,9 +406,8 @@ S_PIE_robust <- ggplot() + geom_point(data = fixed_effects, aes(x = S_PIE_ref, y = S_PIE_sens5, colour = 'sens11'), size = 2) + - geom_errorbarh(data = fixed_effects, - aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens5, colour = 'sens11'), - width = 0) + + geom_linerange(data = fixed_effects, + aes(xmin = S_PIE_ref_lower, xmax = S_PIE_ref_upper, y = S_PIE_sens5, colour = 'sens11')) + geom_linerange(data = fixed_effects, aes(x = S_PIE_ref, ymin = S_PIE_sens5_lower, ymax = S_PIE_sens5_upper, colour = 'sens11')) + # 1:1 line and zero lines diff --git a/r_scripts/8_EAR_sims.R b/r_scripts/7_plot_fig_S8_EAR_sim.R similarity index 97% rename from r_scripts/8_EAR_sims.R rename to r_scripts/7_plot_fig_S8_EAR_sim.R index 772d99b..8f90b65 100644 --- a/r_scripts/8_EAR_sims.R +++ b/r_scripts/7_plot_fig_S8_EAR_sim.R @@ -76,5 +76,5 @@ ggplot() + text = element_text(size = 7)) # 1.5 column width -ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig8.tiff'), +ggsave(paste0(path2wd, 'extended_data_figs_tabs/Ex_Dat_Fig8.png'), width = 120, height = 120, units = 'mm')