View source: R/user_interface.R
do_global_validation_mcmc | R Documentation |
Generates the MCMC output of an out-of-sample validation of a completed
global run of an FPEM model. No post-processing or results generation is done; only the
chains are produced. The recommended way to use this function is via a call
to do_global_validation_run
. See the section “See Also” below.
do_global_validation_mcmc(
run_desc = "",
run_name_override = NULL,
run_name_to_validate = NULL,
run_name_to_validate_output_folder_path = file.path("output", run_name_to_validate),
exclude_unmet_only = FALSE,
exclude_unmet_only_test_prop = 0.2,
at_random = FALSE,
at_random_min_c = 1,
at_random_test_prop = 0.2,
at_end = FALSE,
at_end_not_1_obs_c = FALSE,
at_random_no_data = FALSE,
at_random_no_data_strata = NULL,
at_random_no_data_test_prop = 0.2,
leave_iso_out = FALSE,
leave_iso_out_iso_test = NULL,
year_cutoff = 2005,
seed_validation = 12345,
generate_new_set = TRUE,
estimation_iterations = 3,
burn_in_iterations = 1,
steps_before_progress_report = 4,
thinning = 2,
chain_nums = 1:3,
run_in_parallel = isTRUE(length(chain_nums) > 1),
output_folder_path = NULL,
verbose = FALSE
)
run_desc |
Character. Brief note to be appended to the
auto-generated |
run_name_override |
Character. User defined run name to
override default generation. |
run_name_to_validate |
Name of completed global run to validate. |
exclude_unmet_only |
Logical; do validtion exercise leaving out unmet need observations? See details. |
exclude_unmet_only_test_prop |
Numeric; the proportion of observations to be left out for an unmet need validation run. |
at_random |
Logical; do validtion exercise leaving out observations at random? See details. |
at_random_min_c |
Minimum number of data points per country to ensure are left in training set. |
at_random_test_prop |
Proportion of obs used for test set
when |
at_end |
Logical; do validtion exercise leaving out all
observations after |
at_end_not_1_obs_c |
Logical; should obs that are the only one for their particular country be retained in the training set? |
at_random_no_data |
Logical; do validation exercise where all observations for a randomly selected set of countries are left out at random? |
at_random_no_data_strata |
Column in the country
classifications file (used in the run being validated) to
stratify on if |
at_random_no_data_test_prop |
Numeric; the proportion of
observations to be left out when |
leave_iso_out |
Logical; do validation exercise where all data for only one country is left out? |
leave_iso_out_iso_test |
Three-digit country ISO code,
numeric or character, designating the country to leave out if
|
year_cutoff |
The cut-off year to use to separate test from
training set if |
seed_validation |
Random seed used, among other things, in selection of countries to leave out. |
generate_new_set |
Logical; generate a new training set in validation exercise? |
estimation_iterations |
Numeric. Number of MCMC iterations
that should be saved. This is before
|
burn_in_iterations |
Numeric. Number of MCMC iterations that should be run as burn-in before starting to save them. |
steps_before_progress_report |
Numeric. The number of times progress should reported during MCMC sampling. |
thinning |
Numeric. The actual number of iterations saved is
|
chain_nums |
Numeric. The number of MCMC chains to run,
as a sequence. E.g., for three chains use
|
run_in_parallel |
Logical. Determines if MCMC chains are run in parallel. Parallel running requires package doParallel or doMC.
Defaults to serial running if |
output_folder_path |
Filepath to directory where outputs
should be saved. If |
verbose |
Logical; print lots and lots of messages about progress? |
run_name_to_validate_output_folder |
File path to results of
run |
See “Details” in the help file for
do_global_validation_run
.
A name for the run returned invisibly as a character
string. MCMC chains are saved to
‘output_folder_path
/temp.JAGSobjects’. They need
to be post-processed with post_process_mcmc
. The
run name must be passed to post_process_mcmc
to
locate find the saved chains for processing. Run names for
married and unmarried runs must also be passed to
combine_runs
to generate all women MCMC results.
Mark Wheldon
do_global_validation_run
which calls this
function to generate MCMC results for a validation exercise on
a married or unmarried women run, post-processes it, and
produces 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.