Skip to contents

This function runs a list of INLA models specified in formulas.list on data stacked in dataStack. The function returns a list of model outputs with names matching the input formula names.

Usage

run_model_list(
  formulas.list,
  dataStack,
  likelihood = "gaussian",
  config = FALSE,
  verbose = FALSE,
  archive = TRUE
)

Arguments

formulas.list

A named list of model formulas to be run. Names should match the desired output names.

dataStack

Stacked data object as created by inla.stack.data() function from the INLA package.

likelihood

A character vector specifying which likelihood family to use for each model. If a length 1 character string is provided, it will be used for all models. If a character vector of length n_models is provided, it will be applied in order.

config

A logical value indicating whether or not to retain GMRF representation for sampling.

verbose

A logical value indicating whether or not to print details to screen while running.

archive

A logical value indicating whether or not to save the output in an archive file. Default is TRUE.

Value

models_out A list of model outputs with names corresponding to the input formula names.