How To Install jags on Debian 9

In this tutorial we learn how to install jags on Debian 9. jags is Just Another Gibbs Sampler for Bayesian MCMC - binary

Introduction

In this tutorial we learn how to install jags on Debian 9.

What is jags

jags is:

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.

JAGS was written with three aims in mind:

  • To have an engine for the BUGS language that runs on Unix
  • To be extensible, allowing users to write their own functions, distributions and samplers.
  • To be a plaftorm for experimentation with ideas in Bayesian modelling

This package contains the ‘jags’ binary as well as the associated shared library modules loaded by the binary.

There are three methods to install jags on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install jags Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install jags using apt-get by running the following command:

sudo apt-get -y install jags

Install jags Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install jags using apt by running the following command:

sudo apt -y install jags

Install jags Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install jags using aptitude by running the following command:

sudo aptitude -y install jags

How To Uninstall jags on Debian 9

To uninstall only the jags package we can use the following command:

sudo apt-get remove jags

Uninstall jags And Its Dependencies

To uninstall jags and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove jags

Remove jags Configurations and Data

To remove jags configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge jags

Remove jags configuration, data, and all of its dependencies

We can use the following command to remove jags configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge jags

Dependencies

jags have the following dependencies:

References

Summary

In this tutorial we learn how to install jags package on Debian 9 using different package management tools: apt, apt-get and aptitude.