Published online by Cambridge University Press: 11 May 2017
Software
The subtitle of this book is “using R, JAGS, Python, and Stan.” These software packages are used by astronomers more than any other Bayesian modeling software. Other packages are commonly used by those in other disciplines, e.g., WinBUGS, OpenBUGS, MLwiN, Minitab, SAS, SPSS, and recently, Stata. Minitab, SAS, SPSS, and Stata are general commercial statistical packages. WinBUGS is no longer being supported, future development being given to OpenBUGS. It is freeware, as are R, JAGS, Python, and Stan. MLwiN provides hierarchical and Bayesian hierarchical modeling capabilities and is free for academics.
In this chapter we provide an overview of each package discussed in this text. JAGS and Stan can be run within the R or Python environment. Most scripts discussed in this book use JAGS from within R and Stan from within Python. It is important, however, to state that this is merely a presentation choice and that the alternative combination (Stan from R and JAGS from Python) is also possible. We chose the first combination for didactic reasons, as an opportunity for the interested reader to familiarize themself with a second programming language. In two different contexts (Chapters 8 and 10)we also show how Stan can be used from within R.
The R environment has become the most popular all purpose statistical software worldwide. Many statistical departments require their graduate students to learn R before gaining an advanced degree. Python, however, has quickly been gaining adherents. It is a powerful and user-friendly tool for software development but does not have nearly as many already supported procedures as R.
Astronomers are pretty much split between using R and Python for the statistical analysis of their study data. Each software package has its own advantage. R can be used by itself for a large range of statistical modeling tasks, but until recently its Bayesian capability has been limited to relatively simple models. It is certainly possible, however, for more complex Bayesian models to be written in R, but for the most part R has been used as a framework within which specific Bayesian packages are run, e.g., JAGS, INLA, bmsr, and even Stan. Bayesian astronomers nearly always turn to JAGS or Python for executing complex models. Stan is a new tool that is quickly gaining popularity.
To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.