run_SpARKjags_model: run_SpARKjags_model

View source: R/run_SpARKjags_model.R

run_SpARKjags_modelR Documentation

run_SpARKjags_model

Description

Run SpARKjags model. If model results already exists, return file location.

Usage

run_SpARKjags_model(data, SpARKjags_model, save_to, thin = 1)

Arguments

data

a list containing the data input for the runjags model, generated with jags_data()

SpARKjags_model

a string specifying a model location within the SpARKjags package. The format should be dir/model (as listed in list_models()).

save_to

(optional) a string specifying a custom save location for the model output

thin

(optional; default = 1) an integer specifying (from runjags::run.jags()) the thinning interval to be used in JAGS. Increasing the thinning interval may reduce autocorrelation, and therefore reduce the number of samples required, but will increase the time required to run the simulation. Using this option thinning is performed directly in JAGS, rather than on an existing MCMC object.

Value

Returns codestring specifying the location of the model output


soniamitchell/SpARKjags documentation built on May 5, 2022, 12:09 p.m.