Skip to contents

Runs the JAGS model from setup_likelihood() model_code output. Traces all variables in par_list running 3 chains in parallel with burnin and adapt of 10,000 each and keeping 10,000 iterations per chain.

Usage

run_likelihood(model_input, xvals = NULL, maxY = NULL, future_runs = 3)

Arguments

model_input

Results from setup_likelihood(), including JAGS model script, emissions data, distribution, initial values list, and parameters to monitor.

xvals

Ordered sequence of emissions at which to predict probability density. Default is NULL, in which case x_hat is a 1024 length sequence between 0 and 3*max(data$emissions).

maxY

The maximum emission value possible, used to truncate likelihood distributions and set upper ranges on prior distributions. Default is NULL, in which case it is calculated as 3*maximum(data$emissions).

future_runs

Integer of future runs to use in prediction, the default is 3 since compliance uses 1 test average of 3 runs.

Value

runjags object named run_results, likelihood distribution from the JAGS model script, as well as data and xvals used as inputs.