plot_etiology_side_by_side: compare the posterior distribution of population etiologies...

Description Usage Arguments Details Value See Also Examples

View source: R/plot-etiology-side-by-side.R

Description

compare the posterior distribution of population etiologies side-by-side

Usage

1
2
3
4
5
6
7
plot_etiology_side_by_side(
  DIR_list,
  DIR_pathogen_displayorder_lookup,
  dodge_val = 0.5,
  right_panel = TRUE,
  reg_ind = NULL
)

Arguments

DIR_list

The list of directory paths, each storing a model output.

DIR_pathogen_displayorder_lookup

The directory path to the .csv file that stores the display order of pathogens in the combined music sheet plot.

dodge_val

default is 0.5; for width and position of boxplots.

right_panel

default is TRUE, for bacterial, viral, combo, other groupings. Set to FALSE if not wanted.

reg_ind

A vector of TRUE or FALSE, indicating each directory in the DIR_list contains a regression result or not

Details

plot_etiology_side_by_side produces what we call "music-sheet plot" to compare estimates of population distribution of latent health status (a.k.a population etiology, or population etiology pie). It reads in two or more folders where Bayesian inference results are combined. We implemented a check to make sure that pathogens from one analysis are subset of another. NB: current implementation does not check whether the results are from the same stratum, e.g., same site. We recommend putting information in the the folder names under comparisons.

Value

A figure that compares posterior etiology distribution stored in two or more folders

See Also

Other visualization functions: plot_BrS_panel(), plot_SS_panel(), plot_check_common_pattern(), plot_check_pairwise_SLORD(), plot_etiology_regression(), plot_etiology_strat_nested(), plot_etiology_strat(), plot_group_etiology(), plot_panels(), plot_pie_panel(), plot_selected_etiology(), plot_subwt_regression()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
PATH <- "C:\\package_test"

dir_list <- list(file.path(PATH,"SouthAfrica"),
                 file.path(PATH,"Kenya"))
library(baker)
plot_etiology_side_by_side(dir_list,
  file.path(PATH,"pathogen_displayorder_lookup.csv"))

## End(Not run)

oslerinhealth/baker documentation built on May 22, 2021, 12:05 p.m.