Skip to content
Register Sign in Wishlist

Bayesian Models for Astrophysical Data
Using R, JAGS, Python, and Stan


Award Winner
  • Date Published: April 2017
  • availability: In stock
  • format: Hardback
  • isbn: 9781107133082
Average user rating
(1 review)

£ 65.99

Add to cart Add to wishlist

Other available formats:

Looking for an inspection copy?

This title is not currently available on inspection

Product filter button
About the Authors
  • This comprehensive guide to Bayesian methods in astronomy enables hands-on work by supplying complete R, JAGS, Python, and Stan code, to use directly or to adapt. It begins by examining the normal model from both frequentist and Bayesian perspectives and then progresses to a full range of Bayesian generalized linear and mixed or hierarchical models, as well as additional types of models such as ABC and INLA. The book provides code that is largely unavailable elsewhere and includes details on interpreting and evaluating Bayesian models. Initial discussions offer models in synthetic form so that readers can easily adapt them to their own data; later the models are applied to real astronomical data. The consistent focus is on hands-on modeling, analysis of data, and interpretations that address scientific questions. A must-have for astronomers, its concrete approach will also be attractive to researchers in the sciences more generally.

    • Supplies complete software code in R, JAGS, Python, and Stan for download
    • Discusses innovative Bayesian models that advance and improve astronomical research
    • Demonstrates and enables hands-on use of models on real astronomical data
    Read more


    • Winner, 2018 PROSE Award for Cosmology and Astronomy

    Reviews & endorsements

    'This volume is a very welcome addition to the small but growing library of resources for advanced analysis of astronomical data. Astronomers are often confronted with complex constrained regression problems, situations that benefit from computationally intensive Bayesian approaches. The authors provide a unique and sophisticated guide with tutorials in methodology and software implementation. The worked examples are impressive. Many astronomers use Python and will benefit from the less familiar capabilities of R, Stan, and JAGS for Bayesian analysis. I suspect the work will also be useful to scientists in other fields who venture into the world of Bayesian computational statistics.' Eric D. Feigelson, Pennsylvania State University, author of Modern Statistical Methods for Astronomy

    'Encyclopaedic in scope, a treasure trove of ready code for the hands-on practitioner.' Ben Wandelt, Paris Institute of Astrophysics, Institut Lagrange de Paris, Université Paris-Sorbonne

    'This informative book is a valuable resource for astronomers, astrophysicists, and cosmologists at all levels of their career. From students starting out in the field to researchers at the frontiers of data analysis, everyone will find insightful techniques accompanied by helpful examples of code. With this book, Hilbe, de Souza, and Ishida are firmly taking astrostatistics into the twenty-first century.' Roberto Trotta, Imperial College London, author of The Edge of the Sky

    '… the focus of the book is not on providing a full understanding of how the distributions arise, but to give guidelines on how to write code for applications, including building multi-level models, and here it succeeds well, and is an excellent resource in conjunction with powerful packages such as STAN and JAGS.' Alan Heavens, The Observatory

    See more reviews

    Customer reviews

    25th May 2017 by Bmooers

    This book provides examples of a wide range of generalized linear models for continuous and discrete data including count data. The models for count data include the three-parameter NB-P negative binomial model that are not widely available. The approach is mostly Bayesian. The statistical models are used in the freely available JAGS, Stan, and PyMC3 Bayesian data analysis software. These programs use Markov Chain Monte Carlo (MCMC) samplers to estimate the posterior distributions from complex, multilevel statistical models. The JAGS models are run from within the R statistics program. The Stan models are run with Python via PyStan. The last combination is not common because most Stan users run Stan from within R. There are some pure R examples, including several examples that use the first author's COUNT package. The COUNT package was described in two of his recent books on modeling count data. There are also some examples that use the Python package PyMC3. The first author has published almost 20 books about generalized linear models. His books contain a mix of theory and valuable insights from practical experience. The writing style is clear and readily accessible to scientists with a good background in statistics. The book should also appeal to applied statisticians who are building their repertoire of Bayesian data analysis tools and who are looking for fresh statistical models and code for JAGS, Stan, and PyMC3. The book may be ideal for beginning to intermediate users of Bayesian MCMC software. Most examples contain the complete code for both JAGS and PyStan. The data sets are obtained from the book's webpage or the original sources. The code listings are extensive, so there is not room for in-depth explanation on every topic. For example, Hamiltonian Monte Carlo (HMC) is mentioned only once, and the associated No-U-Turn Sampler (NUTS) is not mentioned. NUTS is responsible for Stan's successes with high-dimensional models. Novices need to go elsewhere to fill out their background (e.g., is a rich information resource). The purpose of the book is to promote the application of Bayesian methods with generalized linear models in astrostatistics by providing computer code. The book will also be valuable to a wider audience looking for a cookbook of statistical models and Bayesian data analysis code. The examples are from astrostatistics, but the reader does not have to be an astrophysicist to comprehend the text.

    Review was not posted due to profanity


    , create a review

    (If you're not , sign out)

    Please enter the right captcha value
    Please enter a star rating.
    Your review must be a minimum of 12 words.

    How do you rate this item?


    Product details

    • Date Published: April 2017
    • format: Hardback
    • isbn: 9781107133082
    • length: 408 pages
    • dimensions: 253 x 193 x 24 mm
    • weight: 1.1kg
    • contains: 66 b/w illus. 23 colour illus. 11 tables
    • availability: In stock
  • Table of Contents

    1. Astrostatistics
    2. Prerequisites
    3. Frequentist vs Bayesian methods
    4. Normal linear models
    5. GLM part I - continuous and binomial models
    6. GLM part II - count models
    7. GLM part III - zero-inflated and hurdle models
    8. Hierarchical GLMMs
    9. Model selection
    10. Astronomical applications
    11. The future of astrostatistics
    Appendix A. Bayesian modeling using INLA

  • Resources for

    Bayesian Models for Astrophysical Data

    Joseph M. Hilbe, Rafael S. de Souza, Emille E. O. Ishida

    General Resources

    Find resources associated with this title

    Type Name Unlocked * Format Size

    Showing of

    Back to top

    This title is supported by one or more locked resources. Access to locked resources is granted exclusively by Cambridge University Press to lecturers whose faculty status has been verified. To gain access to locked resources, lecturers should sign in to or register for a Cambridge user account.

    Please use locked resources responsibly and exercise your professional discretion when choosing how you share these materials with your students. Other lecturers may wish to use locked resources for assessment purposes and their usefulness is undermined when the source files (for example, solution manuals or test banks) are shared online or via social networks.

    Supplementary resources are subject to copyright. Lecturers are permitted to view, print or download these resources for use in their teaching, but may not change them or use them for commercial gain.

    If you are having problems accessing these resources please contact

  • Authors

    Joseph M. Hilbe, Arizona State University
    Joseph M. Hilbe is Solar System Ambassador with NASA's Jet Propulsion Laboratory, California Institute of Technology, Adjunct Professor of Statistics at Arizona State University, and Professor Emeritus at the University of Hawaii. He is currently President of the International Astrostatistics Association (IAA) and was awarded the IAA's 2016 Outstanding Contributions to Astrostatistics medal, the association's top award. Hilbe is an elected Fellow of both the American Statistical Association and the IAA and is a full member of the American Astronomical Society. He has authored nineteen books on statistical modeling, including leading texts on modeling count and binomial data. His book, Modeling Count Data (Cambridge, 2014) received the 2015 PROSE honorable mention for books in mathematics.

    Rafael S. de Souza, University of North Carolina, Chapel Hill
    Rafael S. de Souza is a researcher at Eötvos Loránd University, Budapest. He is currently Vice-President for development of the International Astrostatistics Association (IAA) and was awarded the IAA's 2016 Outstanding Publication in Astrostatistics award. He has authored dozens of scientific papers, serving as the leading author for over twenty of them.

    Emille E. O. Ishida, Université Clermont-Auvergne (Université Blaise Pascal), France
    Emille E. O. Ishida is a researcher at the Université Clermont-Auvergne (Université Blaise Pascal), France. She is cochair of the Cosmostatistics Initiative and coordinator of its Python-related projects. She is a specialist in machine learning applications to astronomy with special interests in type Ia supernovae spectral characterization, classification, and cosmology. She has been the lead author of numerous articles in prominent astrophysics journals and currently serves as chair of the IAA public relations committee.


    • Winner, 2018 PROSE Award for Cosmology and Astronomy

Sorry, this resource is locked

Please register or sign in to request access. If you are having problems accessing these resources please email

Register Sign in
Please note that this file is password protected. You will be asked to input your password on the next screen.

» Proceed

You are now leaving the Cambridge University Press website. Your eBook purchase and download will be completed by our partner Please see the permission section of the catalogue page for details of the print & copy limits on our eBooks.

Continue ×

Continue ×

Continue ×
warning icon

Turn stock notifications on?

You must be signed in to your Cambridge account to turn product stock notifications on or off.

Sign in Create a Cambridge account arrow icon

Find content that relates to you

Join us online

This site uses cookies to improve your experience. Read more Close

Are you sure you want to delete your account?

This cannot be undone.


Thank you for your feedback which will help us improve our service.

If you requested a response, we will make sure to get back to you shortly.

Please fill in the required fields in your feedback submission.