run_custom_model: run_custom_model

View source: R/run_custom_model.R

run_custom_modelR Documentation

run_custom_model

Description

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

Usage

run_custom_model(data, custom_model, thin = 1, save_to)

Arguments

data

a list output from the jags_data function

custom_model

a string specifying a model location

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.

save_to

(optional) a string specifying a custom save location for the model output. If save_to is missing, the model output will be saved in the same directory as the model script.

Value

Returns codestring specifying the location of the model output

Examples

## Not run: 
run_model(data, "individual_models/a.R")

## End(Not run)


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