Description Usage Arguments Details Value Author(s) See Also Examples
This is a general wrapper function for fitting a model to data using the JAGS MCMC algorithm.
The function uses code adapted from the rjags
package. Options include
calculating the Deviance Information Criterion (DIC) and running sampling chains in parallel.
1 2 3 4 5 6 7 8 9 10 11 |
jags_data |
a list of data objects |
jags_model |
character string giving the model specification in JAGS/BUGS syntax |
params |
vector of parameters to monitor |
n_chain |
number of MCMC sampling chains |
n_burn |
number of iterations to discard before sampling of chains begins (burn in) |
n_samp |
number of iterations to sample each chain |
n_thin |
interval to thin samples |
DIC |
logical indicating whether or not to calculate the Deviance Information Criterion (DIC) |
parallel |
logical indicating whether or not to run MCMC chains in parallel or sequentially (default = FALSE). An even number of chains is recommended when running in parallel. |
If JAGS library not already installed, install here: https://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/
an mcmc.list
object
John Giles
Other model:
check()
,
compare()
,
fit_prob_travel()
,
mobility()
,
predict()
,
residuals()
,
summary()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.