Simon N. Wood has arXived a paper on Just Another Gibbs Additive Modeller: Interfacing JAGS and mgcv. Simon is the author of the mgcv package for R, which provides functions for generalized additive (mixed) modelling and is distributed with base R as a recommended package.

Since R version 3.2.0, the mgcv package has included the jagam() function, which generates BUGS code and data for generalized additive models. The jagam() function uses the same interface as the other functions in the mgcv package. The output of jagam can be analyzed directly by JAGS, or modified and incorporated into a larger Bayesian model. We are using jagam in a couple of projects and I highly recommend it if you want to include some smoothing in a hierarchical model.

### Like this:

Like Loading...

*Related*

Have you had any trouble with mixing using jagam? I’m finding that when I run it in a hierarchical model with a non-Guassian likelihood mixing is slow

You should have better mixing if you load the glm module first before compiling the model.