Description Usage Arguments Notes
Run JAGS in parallel and output output of interest. Number of cores used equals number of chains specified. Be sure that your machine has an adequate number of (virtual) cores available to run the model. Function creates a directory with jagsID name, saves .rds file with model output, and produces output summary in text file format.
1 2 3 4 5 6 | jagsRun(jagsData, jagsModel, jagsInits, params, jagsID, jagsDsc, db_hash,
n_chain = 3, n_adapt = 5000, n_burn, n_draw, n_thin = 1,
DEBUG = FALSE, EXTRA = FALSE, RANDOM = FALSE, Rhat_max = 1.05,
n_rburn = 0, n_max = NULL, params_extra = params,
params_report = params, ppc = NULL, obj_out = FALSE,
save_data = FALSE, report = TRUE)
|
jagsData |
List containing data to feed to JAGS |
jagsModel |
JAGS model file |
jagsInits |
Initial values for JAGS model. Should be a list of lists (number of embedded lists should equal the number of chains being run in the model). NOTE: each chain should specify a different starting value for a particular parameter and/or use a different seed/RNG to avoid identical chains. |
params |
Character string or vector of character strings specifying which parameters to track |
jagsID |
OPTIONAL. Character string with name of jags run (e.g., 'Run_1') |
jagsDsc |
OPTIONAL. Character string with description of the jags run (e.g., 'First model run') |
db_hash |
OPTIONAL. Character string with description of data version which will be printed in the output file. Could be latest git commit hash. |
n_chain |
Numeric specifying number of chains to be run |
n_adapt |
Numeric specifying how many iterations to use for adaptation |
n_burn |
Numeric specifying how any iterations to use for burn-in |
n_draw |
Numeric specifying how many iterations to use for draw (iterations to be kept beyond adaptation and burn-in) |
n_thin |
Numeric specifying thinning rate |
DEBUG |
Logical used to specify whether DEBUG mode should be used. If |
EXTRA |
Logical used to specify whether extra iterations should be run if convergence is not met. If |
RANDOM |
Logical specifying whether to use script to generate random inits. If |
Rhat_max |
Numeric specifying the maximum Rhat value allowed when |
n_rburn |
Numeric specifying how many samples to use for burn in if |
n_max |
Numeric specifying the maximum number of samples to be drawn when |
params_extra |
Character string or vector of character strings specifying which parameters to evaluate convergence for when |
params_report |
Character string or vector of character strings specifying which parameters to report. Must be a subset of |
ppc |
Character string or vector of character strings specifying the name of elements used for the posteriod predictive check (PPC). If specified, the summary information for these elements will be output in the report. |
obj_out |
Logical specifying whether MCMC.list object should be output |
save_data |
Logical specifying whether input data to function should be saved as a .rds object |
report |
Logical specifying whether to generate directory with report and .rds object - if FALSE, MCMC.list object is output |
jagsData should be formatted as such: XXXXX. jagsInits should be formatted as such: XXXXX. Jags params should be formatted as such: XXXXX.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.