Have you ever you ever been kin on learning something new, but don't know where to start? Learning a new programming language or skill often feels like that (at least for me). There's usually tons of information about it, but if you are new to it, this only makes the question of where to start even harder.
If you found where to start, you are on the right track, now the question gets more practical. I have found that first I need to understand what is the general structure when coding in a new environment, and how to do it myself.
Going through some basic or general examples does a lot in my learning process. However, the more specific a programming tool is, the more specific the examples you find. My motivation for the package was exactly giving focus on generating some examples that could help when learning a new coding skill.
Just Another Gibbs Sampler or better known as JAGS is a program for Bayesian graphical model analyses using Markov Chain Monte Carlo (MCMC) simulation. JAGS aims for compatibility with classic BUGS, Bayesian inference Using Gibbs Sampling, and other software such as R.
There are several packages to run JAGS using R
, however we still need to code within BUGS programming language. This package aims to help understand the basic structure of JAGS models and data specification, so you can use the output code from the functions in this package or create your own using the output as a helper in your coding.
myJpackage
is a collection of functions that will produce a code as output. It is the opposite of what we usually expect from an R
function, where the output is a manipulation of the data in some way. Here, there are no data results, but actually a longer code. However, this is the code you can pass to your JAGS model. Also, the arguments for the functions have to do with the type of model you want to specify in JAGS.
General code for model specification.
An idea on how to manipulate data within JAGS.
JAGS parametrization for main distributions. JAGS parametrization is not the same as R!
Built examples.
Hopefully, a better understanding of the structure of JAGS code (or a useful reminder if you forget later on).
You can use the package in any way you want, but if you are new to JAGS I would recommend the following trying these functions first.
jags_init()
jags_examples()
jags_model()
jags_runjags()
You need to install JAGS on your computer and then install the runjags
library. The JAGS version will depend on your computer operating system, jags_init()
will be of help.
If you want to know more about JAGS, and not about the american football team Jacksonville Jaguars, use "jags bayes" on your Google search.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.