Just another Gibbs sampler

{{Short description|Statistical simulation software}}

{{Infobox software

| name = JAGS

| author = Martyn Plummer

| released = {{Start date|2007|12|11}}

| discontinued =

| latest release version = {{wikidata|property|edit|reference|P348}}

| latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}}

| programming language = C++

| operating system = Unix-like, Microsoft Windows, Mac OS X

| platform = Intel x86 - 32-bit, x64

| size = {{Nowrap|1.7 MB}}

| genre = Statistical package

| license = GNU General Public License

| website = {{URL|http://mcmc-jags.sourceforge.net/}}

}}

Just another Gibbs sampler (JAGS) is a program for simulation from Bayesian hierarchical models using Markov chain Monte Carlo (MCMC), developed by Martyn Plummer. JAGS has been employed for statistical work in many fields, for example ecology, management, and genetics.{{Cite journal | last1 = Semmens | first1 = B. X. | last2 = Ward | first2 = E. J. | last3 = Moore | first3 = J. W. | last4 = Darimont | first4 = C. T. | editor1-last = Getz | editor1-first = Wayne M | title = Quantifying Inter- and Intra-Population Niche Variability Using Hierarchical Bayesian Stable Isotope Mixing Models | doi = 10.1371/journal.pone.0006187 | journal = PLOS ONE | volume = 4 | issue = 7 | pages = e6187 | year = 2009 | pmid = 19587790| pmc =2704373 | bibcode = 2009PLoSO...4.6187S | doi-access = free }}{{Cite journal | last1 = Johnson | first1 = T. R. | last2 = Kuhn | first2 = K. M. | doi = 10.3758/s13428-012-0300-3 | title = Bayesian Thurstonian models for ranking data using JAGS | journal = Behavior Research Methods | volume = 45 | issue = 3 | pages = 857–872 | year = 2013 | pmid = 23539504| s2cid = 42660145 }}{{Cite journal | last1 = McKeigue | first1 = P. M. | last2 = Campbell | first2 = H. | last3 = Wild | first3 = S. | last4 = Vitart | first4 = V. | last5 = Hayward | first5 = C. | last6 = Rudan | first6 = I. | last7 = Wright | first7 = A. F. | last8 = Wilson | first8 = J. F. | doi = 10.1093/ije/dyp397 | title = Bayesian methods for instrumental variable analysis with genetic instruments ('Mendelian randomization'): Example with urate transporter SLC2A9 as an instrumental variable for effect of urate levels on metabolic syndrome | journal = International Journal of Epidemiology | volume = 39 | issue = 3 | pages = 907–918 | year = 2010 | pmid = 20348110| pmc =2878456 }}

JAGS aims for compatibility with WinBUGS/OpenBUGS through the use of a dialect of the same modeling language (informally, BUGS), but it provides no GUI for model building and MCMC sample postprocessing, which must therefore be treated in a separate program (for example calling JAGS from R through a library such as rjags and post-processing MCMC output in R).Martyn Plummer (2003). [https://www.r-project.org/conferences/DSC-2003/Drafts/Plummer.pdf JAGS: A Program for Analysis of Bayesian Graphical Models Using Gibbs Sampling], Proceedings of the 3rd International Workshop on Distributed Statistical Computing (DSC 2003), March 20–22, Vienna, Austria. ISSN 1609-395X.

The main advantage of JAGS in comparison to the members of the original BUGS family (WinBUGS and OpenBUGS) is its platform independence. It is written in C++, while the BUGS family is written in Component Pascal, a less widely known programming language.{{cite journal | last1 = Lunn | first1 = David | last2 = Spiegelhalter | first2 = David | last3 = Thomas | first3 = Andrew | last4 = Best | first4 = Nicky |author4-link= Nicky Best | year = 2009 | title = The BUGS project: Evolution, critique and future directions | url = http://w3.jouy.inra.fr/unites/miaj/public/matrisq/Contacts/applibugs.bugs_project.evolution.pdf | journal = Statistics in Medicine | volume = 28 | issue = 25 | pages = 3049–3067 | doi = 10.1002/sim.3680 | pmid = 19630097 | url-status = dead | archive-url = https://web.archive.org/web/20120915083751/http://w3.jouy.inra.fr/unites/miaj/public/matrisq/Contacts/applibugs.bugs_project.evolution.pdf | archive-date = 2012-09-15 }}Simon Jackman (2009). Bayesian Analysis for the Social Sciences. Wiley Series in Probability and Statistics, volume 845. John Wiley and Sons. {{ISBN|978-0-470-01154-6}}. In addition, JAGS is already part of many repositories of Linux distributions such as Ubuntu. It can also be compiled as a 64-bit application on 64-bit platforms, thus making all the addressable space available to BUGS models.

JAGS can be used via the command line or run in batch mode through script files. This means that there is no need to redo the settings with every run and that the program can be called and controlled from within another program (e.g. from R via rjags as outlined above).

JAGS is licensed under the GNU General Public License.

See also

References

{{reflist|30em}}