Skip navigation.
Home

JAGS (Just Another Gibbs Sampler) Installation

JAGS is Just Another Gibbs Sampler. It is a program for analysis of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation not wholly unlike BUGS.


cd /usr/local/src/JAGS
wget http://downloads.sourceforge.net/project/mcmc-jags/JAGS/3.x/Source/JAGS-...
tar xvf JAGS-3.4.0.tar.gz
mv JAGS-3.4.0 jags-3.4.0
cd jags-3.4.0
../config
make
make check
make install
make installcheck

The config script takes the following form


#!/bin/bash
install=$(basename $(pwd) | sed 's%-%/%')
./configure --prefix=/usr/local/$install

Create a modulefile for the version and symlink.


cd /usr/local/Modules/modulefiles/jags
ln -s .base 3.4.0

The .base module looks like:


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "$desc (v$ver)"
prepend-path --delim " " CFLAGS -I/usr/local/$name/$ver/include
prepend-path --delim " " CPPFLAGS -I/usr/local/$name/$ver/include
prepend-path --delim " " LDFLAGS -L/usr/local/$name/$ver/lib
prepend-path LD_LIBRARY_PATH /usr/local/$name/$ver/lib
prepend-path PATH /usr/local/$name/$ver/bin
prepend-path MANPATH /usr/local/$name/$ver/share/man