@@ -227,6 +227,8 @@ lanonc_colours <- ggsci::pal_lancet("lanonc")(9)
227227text_size <- 28
228228
229229qa_thresh_vec <- c(" all" = - 1 , " qa" = 0.5 )
230+ qa_alpha_vec <- c(0.3 , 1 )
231+
230232labels <- c(" SI_allqa" , " " )
231233colour_columns <- c(" parameter_type" ,
232234 " population_group" ,
@@ -244,6 +246,7 @@ p7_oo_reduced_plots <- list("all"=list())
244246for (i in seq_along(qa_thresh_vec )){
245247 label <- labels [i ]
246248 qa_threshold <- qa_thresh_vec [i ]
249+ qa_alpha <- qa_alpha_vec [i ]
247250 plot_type <- names(qa_thresh_vec )[i ]
248251 dir.create(plot_type , showWarnings = FALSE )
249252 for (colour_col in colour_columns ){
@@ -273,7 +276,7 @@ for (i in seq_along(qa_thresh_vec)){
273276 p1_incb_plots [[plot_type ]][[colour_col ]] <- forest_plot(
274277 d1 | > filter(qa_score > qa_threshold ), " Incubation period (days)" ,
275278 colour_col , c(0 ,35 ), text_size = text_size , segment_show.legend = NA ,
276- sort = TRUE , custom_colours = custom_colours )
279+ sort = TRUE , custom_colours = custom_colours , qa_alpha = qa_alpha )
277280
278281 ggsave(file.path(plot_type ,
279282 paste0(" figure_5" , label , " _incubation_" ,
@@ -285,7 +288,8 @@ for (i in seq_along(qa_thresh_vec)){
285288 p2_oa_plots [[plot_type ]][[colour_col ]] <- forest_plot(
286289 d2 | > filter(qa_score > qa_threshold ),
287290 ' Symptom onset-to-hospitalisation delay (days)' , colour_col , c(0 ,20 ),
288- text_size = text_size , sort = TRUE , custom_colours = custom_colours )
291+ text_size = text_size , sort = TRUE , custom_colours = custom_colours ,
292+ qa_alpha = qa_alpha )
289293
290294 ggsave(file.path(plot_type ,
291295 paste0(" figure_5" , label , " _onset_admis_" ,
@@ -309,7 +313,7 @@ for (i in seq_along(qa_thresh_vec)){
309313 p3_ao_plots [[plot_type ]][[colour_col ]] <- forest_plot(
310314 d3 | > filter(qa_score > qa_threshold ), ' Hospitalisation-to-outcome (days)' ,
311315 colour_col , c(0 ,45 ), text_size = text_size , sort = TRUE ,
312- custom_colours = custom_colours )
316+ custom_colours = custom_colours , qa_alpha = qa_alpha )
313317 ggsave(file.path(plot_type ,
314318 paste0(" figure_5" , label , " _admis_outcome_" ,
315319 colour_col_label , " .pdf" )),
@@ -355,7 +359,8 @@ for (i in seq_along(qa_thresh_vec)){
355359 d4_x_axis_label , colour_col , xlim ,
356360 text_size = text_size , sort = TRUE ,
357361 segment_show.legend = c(shape = FALSE , colour = TRUE ),
358- custom_colours = custom_colours ) +
362+ custom_colours = custom_colours ,
363+ qa_alpha = qa_alpha ) +
359364 # Showing Sim overlaid
360365 geom_point(data = sim_duplicated_row ,
361366 aes(x = parameter_value , y = refs ,
@@ -402,7 +407,7 @@ for (i in seq_along(qa_thresh_vec)){
402407 d6 | > filter(qa_score > qa_threshold ),
403408 ' Symptom onset/Hospitalisation-to-outcome (days)' ,
404409 colour_col , xlim , text_size = text_size , sort = TRUE ,
405- custom_colours = custom_colours )
410+ custom_colours = custom_colours , qa_alpha = qa_alpha )
406411 ggsave(file.path(plot_type ,
407412 paste0(" figure_5" , label , " _onset_admis_outcome_" ,
408413 colour_col_label , " .pdf" )),
@@ -434,7 +439,7 @@ for (i in seq_along(qa_thresh_vec)){
434439 d7 | > filter(qa_score > qa_threshold ),
435440 ' Symptom onset-to-outcome (days)' ,
436441 colour_col , c(0 ,85 ), text_size = text_size , sort = TRUE ,
437- custom_colours = custom_colours )
442+ custom_colours = custom_colours , qa_alpha = qa_alpha )
438443 ggsave(file.path(plot_type ,
439444 paste0(" figure_5" , label , " _onset_outcome_reduced_" ,
440445 colour_col_label , " .pdf" )),
0 commit comments