Process a list of data scenarios in parallel.
scenario_list_jointBLRM.RdWrapper for calling scenario_jointBLRM()
for a list of data scenarios, and processing them in parallel. This function is mostly included
for convenience, e.g. to evaluate a number of scenarios that are used for prior adjustment
in a quick manner.
Please note that for parallel execution, a parallel backend needs to be registered by the user.
A basic example of this is available in the following vignette:
vignette("parallelization_jointBLRM", package = "decider").
Be aware that input checks are performed by scenario_jointBLRM().
If this results in an error for one or more scenarios, the error is returned in the output list.
Arguments
- data.list
List of hypothetical data scenarios. Each entry is passed to
scenario_jointBLRM().- file.names
Optional character vector, defaults to
NULL. The argument has only an effect when results are saved to disk, i.e. when an additional argumentpathis supplied that states the output location. If apathis supplied andfile.namesisNULL, thefile.nameof the output for scenario \(i\) will be"scenario_i". Otherwise, a vector with the same length as thedata.listcan be supplied asfile.names, which is used as a file name for each scenario.- ...
Arguments that are passed to
scenario_jointBLRM(), e.g. priors, number of MCMC iterations, and number of chains. Can contain any arguments ofscenario_jointBLRM(), except for the argumentdata, which is taken from thedata.listinstead, and for the argumentfile.name, which is taken fromfile.namesinstead. Note in particular thathistorical.datacan still be supplied, which is then included in every evaluated scenario, additionally to the scenario-specific data from thedata.listentries.
Value
Numbered list in which each entry contains the output of scenario_jointBLRM()
for the corresponding trial in the data.list.
Details
Be aware that parallelization requires the initialization of a parallel backend by the user. Otherwise, the function is executed sequentially.