View source: R/user_interface.R
make_results | R Documentation |
Once post-processed, a global model can be used to generate results in the form of summary figures and tables of key indicators. Summaries are in the form of quantiles of posterior marginal distributions, and means for some indicators.
make_results(
run_name = NULL,
output_folder_path = file.path("output", run_name),
input_data_folder_path = NULL,
countries_in_CI_plots_csv_filename = "countries_mwra_195.csv",
CI_plots_years = NULL,
plot_diagnostic_CI_plots = FALSE,
make_all_bar_charts = NULL,
plot_barchart_years = NULL,
data_info_plot_years = c(1990, 2000, 2010),
plot_CI_changes_years = NULL,
plot_maps_shapefile_folder = NULL,
plot_maps_years = NULL,
plot_prior_post = NULL,
plot_parameters = NULL,
tabulate_changes = TRUE,
adjust_medians = TRUE,
make_any_aggregates = TRUE,
special_aggregates_name = NULL,
make_age_ratios = NULL,
validation_keep_all = TRUE,
validation_return_res_as_df = FALSE,
all_women = NULL,
verbose = FALSE
)
run_name |
The name of the run to post-process. |
output_folder_path |
Filepath to directory where outputs
should be saved. If |
input_data_folder_path |
File path to folder containing
all input data (except any map shapefiles). If
|
countries_in_CI_plots_csv_filename |
Name of ‘.csv’ file
that lists the countries to be included in the main
country-level indicator plots. These are the plots saved in
‘ |
plot_diagnostic_CI_plots |
Logical. Produce diagnostic versions of the main country-level indicator plots. These have zoomed y-axes. |
make_all_bar_charts |
Logical. Produce barcharts? If
|
plot_barchart_years |
Vector of years for which bar charts
should be produced. These are saved to
‘ |
plot_CI_changes_years |
Vector of length two (if longer, only
the first and last elements are used). Declares the years to
be used to make the “fish bone” plots, i.e., the plots
appearing in files
‘ |
plot_maps_shapefile_folder |
Path to directory containing
shapefiles for maps. Only needed if |
plot_maps_years |
Vector of years for which maps are desired;
the full set of maps are produced for each of the years
listed. These must be in the range of |
plot_parameters |
Logical. Should posterior quantiles of model parameters be added to the plots in legend boxes? |
adjust_medians |
Logical. Should adjusted medians outputs be produced in addition to unadjusted outputs? |
make_any_aggregates |
Logical. Should country aggregates of any kind (including default aggregates) be produced? |
special_aggregates_name |
name for special aggregates,
if any. The default, |
make_age_ratios |
Logical. Should results for age-ratios be
made? If |
validation_keep_all |
Logical. Should validation results be
saved? If |
validation_return_res_as_df |
Logical; should the validation
results be returned as a data frame? If |
verbose |
Logical; print lots and lots of messages about progress? |
married_women_run_name |
Run name of a married women
run. Relevant if |
unmarried_women_run_name |
Run name of a unmarried women
run. See |
married_women_output_folder_path |
Path to directory
containing outputs for a married women run. See
|
unmarried_women_output_folder_path |
Path to directory
containing outputs for a unmarried women run. See
|
The indicators for which these summaries are generated are, by country and country aggregate, by year:
Contraceptive prevalence, any method (CP)
Contraceptive prevalence, traditional methods (CP modern)
Contraceptive prevalence, modern methods (CP traditional)
Unmet need for (modern) contraception (unmet need)
CP + Unmet need
Met demand for any method of contraception
Met demand for modern methods of contraception
Ratio of CP modern to CP
Probability that met demand for modern methods is greater than 75 percent
Either run_name
invisibly as a character string or,
if isTRUE(validation_return_res_as_df)
, a data frame
(non-invisibly) containing validation results.
post_process_mcmc
generates trajectories for the
age ratios for countries for married, unmarried, and all
women. However, combine_runs
, not
post_process_mcmc
, produces the trajectories for
age ratios for country aggregates, including those for married
and unmarried women. When make_results
is
applied to an all women run, an attempt is made to find the
corresponding
Mark Wheldon, Andrew Tait
do_global_run
(which calls this function)
to generate MCMC results for married or unmarried women,
post-process, and produce results all in one call;
combine_runs
to create all women results
from married and unmarried women runs;
do_global_all_women_run
to do married, unmarried,
and all women runs, and produce results, all in one
call.
vignette("FPEMglobal_Intro")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.