combine_runs: Make all women results from married and unmarried women FPEM...

View source: R/user_interface.R

combine_runsR Documentation

Make all women results from married and unmarried women FPEM runs

Description

Combines MCMC outputs from married and unmarried women FPEM runs to make MCMC outputs for all women. The MCMC outputs must have been produced by do_global_mcmc or do_global_run (the former is sufficient).

Usage

combine_runs(
  run_desc = "",
  output_folder_path = NULL,
  married_women_run_name = NULL,
  married_women_run_output_folder_path = NULL,
  unmarried_women_run_name = NULL,
  unmarried_women_run_output_folder_path = NULL,
  unmarried_women_run_data_folder_path =
    file.path(unmarried_women_run_output_folder_path, "data"),
  region_information_csv_filename = "country_and_area_classification.csv",
  special_aggregates_name = NULL,
  denominator_counts_csv_filename = NULL,
  countries_for_aggregates_csv_filename = "countries_mwra_195.csv",
  countries_in_CI_plots_csv_filename = "countries_mwra_195.csv",
  start_year = 1970.5,
  end_year = 2030.5,
  years_change = matrix(c(1990.5, 2000.5, 2000.5, 2019.5, 2019.5, 2030.5, 2012.5, 2019.5,
    2012.5, 2019.5, 2012.5, 2020.5), ncol = 2, byrow = TRUE),
  years_change2 = matrix(c(2005.5, 2010.5, 2015.5, 2000.5, 2005.5, 2010.5, 1995.5,
    2000.5, 2005.5, 1990.5, 1995.5, 2000.5, 1990.5, 2000.5, 2010.5, 2000.5, 2010.5,
    2019.5), ncol = 3, byrow = TRUE),
  make_any_aggregates = TRUE,
  adjust_medians = TRUE,
  age_ratios_age_total_unmarried_run_name = NULL,
  age_ratios_age_total_married_run_name = NULL,
  age_ratios_age_total_all_women_run_name = NULL,
  age_ratios_age_total_unmarried_output_folder_path = NULL,
  age_ratios_age_total_married_output_folder_path = NULL,
  age_ratios_age_total_all_women_output_folder_path = NULL,
  age_ratios_age_total_denominator_counts_csv_filename = "number_of_women_15-49.csv",
  age_ratios_age_total_denominator_counts_folder_path = NULL,
  run_name_override = NULL,
  verbose = FALSE
)

Arguments

run_desc

Character. Brief note to be appended to the auto-generated run_name. Ignored if run_name_override is non-NULL.

output_folder_path

Filepath to directory where outputs should be saved. If NULL, defaults to file.path("output", run_name).

married_women_run_name

Run name of the married women run to be combined. Ignored if married_women_run_output_folder_path is NULL. Otherwise, the output folder will be assumed to be file.path("output", married_women_run_name).

married_women_run_output_folder_path

Path to the folder containing results for the married women run to be combined.

unmarried_women_run_name

Same as married_women_run_name but for the unmarried women run.

unmarried_women_run_output_folder_path

Path to the folder containing results for the unmarried women run to be combined.

unmarried_women_run_data_folder_path

Path to the folder containing results for the unmarried women run to be combined. (Only used if special_aggregates_name is non-NULL).

region_information_csv_filename

Filename of the ‘.csv’ file containing classifications of countries in sub-regions, regions, etc. See “Details”.

special_aggregates_name

Character vector of names (not filenames) of any speical aggregates desired. There must be a corresponding file with name ‘special_aggregates_name.csv’ in input_data_folder_path that defines the special aggregates. See “Details”.

denominator_counts_csv_filename

Name of the ‘.csv’ file containing estimates and projections of the number of women by marital status, age, and year. See “Details”.

countries_for_aggregates_csv_filename

Name of the ‘.csv’ file listing countries that will be used in constructing country aggregates.

countries_in_CI_plots_csv_filename

Name of ‘.csv’ file that lists the countries to be included in the main country-level indicator plots. See make_results for further details. combine_runs will copy this file to ‘output_folder_path/data’ so it is available for make_results.

start_year

Estimates and projections are produced for a specified time interval. This is the start year of that interval.

end_year

Estimates and projections are produced for a specified time interval. This is the end year of that interval.

years_change

A two-column matrix giving the year pairs (as rows) between which probabilistic estimates of changes in the indicators are desired.

years_change2

A three-column matrix giving the year triples (as rows) among which to compute probabilistic estimates of change-in-changes.

make_any_aggregates

Logical. Should country aggregates of any kind (including default aggregates) be produced?

adjust_medians

Logical. Should adjusted medians outputs be produced in addition to unadjusted outputs?

age_ratios_age_total_unmarried_run_name

Run name of the unmarried 15–49 run to use as the denominator for age ratios.

age_ratios_age_total_married_run_name

Run name of the married 15–49 run to use as the denominator for age ratios.

age_ratios_age_total_all_women_run_name

Run name of the all women 15–49 run to use as the denominator for age ratios.

age_ratios_age_total_unmarried_output_folder_path

File path to output directory of the unmarried 15–49 run to use to make age ratios.

age_ratios_age_total_married_output_folder_path

File path to output directory of the married 15–49 run to use to make age ratios.

age_ratios_age_total_all_women_output_folder_path

File path to output directory of the all women 15–49 run to use to make age ratios.

age_ratios_age_total_denominator_counts_csv_filename

Name of the ‘.csv’ file containing estimates and projections of the number of women by marital status, age, and year, for the age group 15–49. Only used if make_age_ratios is TRUE. Searched for in age_ratios_age_total_denominator_counts_folder_path.

age_ratios_age_total_denominator_counts_folder_path

Path to age_ratios_age_total_denominator_counts_csv_filename. If NULL, defaults to file.path(age_ratios_age_total_output_folder_path, "data").

run_name_override

Character. User defined run name to override default generation. run_desc is ignored if this is non-NULL.

verbose

Logical; print lots and lots of messages about progress?

Details

Married and unmarried women runs must have been produced previously by, e.g,. do_global_run. They are identified by their output directory filepaths (married_women_run_output_folder_path and unmarried_women_run_output_folder_path). Files from the married and unmarried runs that are needed to make all women results are copied to output_folder_path (and sub-directories) and noted in files called ‘log.txt’ in the respective directories. The file ‘output_folder_path/log.txt’ provides a record of which married and unmarried women runs were combined.

Value

A name for the run returned invisibly as a character string. Results are saved to ‘output_folder_path’.

Author(s)

Mark Wheldon, Andrew Tait.

See Also

do_global_all_women_run to do married, unmarried, and all women runs, and produce results, all in one call.

Examples

vignette("FPEMglobal_Intro").


FPcounts/FPEMglobal documentation built on July 20, 2024, 2:35 a.m.