Skip to contents

Wrapper for calling scenario_covariate_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.

Usage

scenario_list_covariate_jointBLRM(data.list, file.names = NULL, ...)

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 argument path is supplied that states the output location. If a path is supplied and file.names is NULL, the file.name of the output for scenario \(i\) will be "scenario_i". Otherwise, a vector with the same length as the data.list can be supplied as file.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 of scenario_jointBLRM(), except for the argument data, which is taken from the data.list instead, and for the argument file.name, which is taken from file.names instead. Note in particular that historical.data can still be supplied, which is then included in every evaluated scenario, additionally to the scenario-specific data from the data.list entries.

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.