Skip to main content
Advertisement
  • Loading metrics

Ten quick tips to get you started with Bayesian statistics

Introduction

Bayesian statistics is a framework in which our knowledge about unknown quantities of interest (especially parameters) is updated with the information in observed data, though it can also be viewed as simply another method to fit a statistical model. It has become popular in many branches of biology [1,2]. For context, 5 of the 10 most cited papers in Web of Science with keywords ‘Bayesian statistics’ are related to biology (as of August 19, 2024). The use of Bayesian statistics in biology allows researchers to run analyses that incorporate external knowledge, describe complex systems, and work effectively with limited or messy data. However, most biologists are first trained in frequentist statistics. Learning to become fluent in Bayesian statistics may be perceived as too time-consuming to undertake, or the prospect of adopting an unfamiliar statistical framework can simply appear too daunting. Despite this perception, however, the learning curve for Bayesian statistics is gradual, not steep, and benefits will quickly outweigh investments.

To aid you on this journey, we provide a list of 10 tips, summarized in Fig 1, to help you get started with Bayesian statistics. In Table 1 we have also compiled a glossary for definitions of technical terms. Our paper is not intended as a comprehensive introduction to Bayesian statistics. Instead, it provides guidance for applying Bayesian statistics and points to additional resources where you can learn the basics. This paper is not just for newcomers but also for those with some experience in Bayesian methods who may use it as a roadmap to design, conduct, and publish Bayesian analyses. We’ve drawn mainly on our experience teaching and working with ecologists, but we hope these tips will be relevant to a broader audience of biologists. For those seeking to deepen their understanding, we point to more comprehensive resources that offer an in-depth exploration of Bayesian statistics. The purpose of our paper is not to persuade you to abandon frequentist methods in favor of Bayesian methods. Instead, we advocate for a pragmatic dual approach where you master both methods as part of your analytical toolkit and choose the most appropriate tool for your problem.

thumbnail
Fig 1. Graphical summary of 10 quick tips to get started with Bayesian statistics and how they fit into a larger view of an analytical workflow with Bayesian models.

Because some tips pertain to overarching concepts and best practices, and others are more specific to certain parts of the Bayesian workflow, the numbering does not align perfectly with workflow progression.

https://doi.org/10.1371/journal.pcbi.1012898.g001

1. Get a basic understanding of the ideas of Bayes

Bayesian statistics infers unknowns, such as model parameters, using conditional probability [35]. Probability in classical statistics describes the variability of observable data, treated as random variables with distributions. In Bayesian statistics, however, probability quantifies our knowledge about anything unobservable, including parameter values. For example, one might say, “I am 99% certain it will rain.” Conditional probability via Bayes’ rule allows for us to update prior knowledge (from independent data or assumptions) to a new state of knowledge represented by a posterior distribution.

The likelihood function is defined by the statistical model; in a way, the likelihood function is the model—it is the link between the data and the parameters being estimated [6]. It underpins Bayesian and frequentist methods alike, but while frequentists rely solely on likelihood for estimation, Bayesians also incorporate prior distributions (Tip #2), allowing external information to influence the estimates. A Bayesian model thus combines a likelihood with priors, resulting in the posterior distribution which reflects our updated knowledge of a parameter as a probability distribution (Fig 2). Point estimates can be obtained using summary metrics like the mean, median, or mode, and uncertainty via standard deviation or percentiles.

Most Bayesian models require approximations to evaluate Bayes’ rule, commonly through simulation techniques such as Markov chain Monte Carlo (MCMC). MCMC generates a sequence of random values for each parameter that starts from a specified initial value and ideally converges on a stationary distribution that is the desired posterior distribution. The magic of MCMC simplifies the otherwise complex or even intractable integrals involved in Bayes’ rule by sampling values proportional to their posterior distribution.

2. Think of your priors

The prior distribution is a fundamental part of Bayes rule and any Bayesian model. The prior describes our expectations regarding the possible values for a parameter, and allows us to formally incorporate auxiliary information in the analysis (via an informative prior). Nonetheless, most analysts specify priors that express a lack of prior information (“vague” or “noninformative”)—or, as is often said, to “let the data speak for themselves” — even if auxiliary information is available from previous studies or expert opinion (Fig 2). There are some situations in which using informative priors is reasonable or even necessary [7,8]. For example, when a complex model has a known non-identifiable or weakly identifiable parameter (Tip #6), the use of an informative prior may make this parameter estimable. Another example is using parameter estimates from previously conducted, comparable studies to improve estimates (chapter 20 in [9]).

thumbnail
Fig 2. Schematic representation of prior (yellow) and posterior (green) distributions given data (blue).

The prior distribution represents our expectation of what values the parameter can take. Vague priors are relatively flat across the possible parameter space (i.e., they contain little information), meaning that the posterior distribution is based primarily on information contained in our data. Informative priors can be used to include auxiliary knowledge (e.g., from the literature or expert judgements) to be evaluated alongside data when determining the posterior distribution and can be useful particularly in situations with sparse data.

https://doi.org/10.1371/journal.pcbi.1012898.g002

So, exactly which prior distribution do we choose for a parameter? For vague priors, you want a distribution that (i) is “locally uniform” (approximately flat) in the vicinity of the true value of the parameter and (ii) covers the full range of its permissible values. For example, for regression parameters (intercept, slopes), we could use a normal distribution with mean 0 and large variance, whereas for probabilities, a uniform distribution between 0 and 1 is a natural choice. There are nonetheless many alternatives for specifying either vague or informative priors for different parameters, and the “right” choice will depend on the model, data, and auxiliary information available [8,10]. The effect of prior choice on inferences can be checked with a prior sensitivity analysis—if there is concern whether a specific prior is sufficiently vague compared to some other choice, test them against each other by rerunning the analysis and see how (much) the results change.

3. Apply standard modeling principles

General statistical principles still apply in Bayesian statistics [11,12] (Appendix B in [13]), e.g., always clarify your modeling goals (whether to describe, understand, explain, or predict), show/visualize your data [14], check assumptions, plan your study design carefully [13], and report effect size. In this tip, we focus on two such principles.

Start simple, increase complexity little by little: Sometimes people get into Bayesian analysis because they have a complex modeling problem they cannot solve with a canned R, Python, or Julia package [15]. Upon learning how to write models in one of the languages compatible with Bayesian software, it is tempting to jump straight in and try to implement that complex model in the Bayesian framework of your choice.

In doing so, there is a good chance you will wait for half an eternity, only to be confronted with various arcane errors that are hard to make sense of or worse, the software might not generate errors, but the estimates, while appearing to be drawn from a stationary distribution yet, are in fact stuck in a corner of the posterior distribution. Avoid this by following one simple rule: always start from the simplest possible version of your model! That is, you should take a modular, stepwise approach to model fitting—this allows you to test whether “things are in order”: your data are formatted properly, there are no strange data issues such as data values out of range, or bad prior distributions that suggest inconsistent data.

This stepwise approach is especially important in Bayesian analysis because the performance and behavior of the MCMC algorithm is paramount. MCMC runtime scales with the size of your data set and model complexity, so starting with a simple model allows you to benchmark the run-time and to check that it is viable within the scope of your work plan (e.g., [16]). Moreover, as the model increases in complexity, it will be easier to identify potential data limitations or identifiability problems (Tip #6). After this first, simple model is running well and the results are sensible, you can incrementally build your model up to be more and more complex until arriving at your desired model (Tip #7).

Use simulated data sets: a complementary approach to get an even better grasp of your model is to work with simulated data sets. Data analysis and data simulation are almost the same thing, but use a model in different directions: analysis takes data and models and estimates parameters, while simulation assumes parameter values and a model and generates potential data sets.

The first goal of data simulation is to enforce an understanding of a model: if you are unable to simulate data under a model, you probably don’t fully understand it. Similarly, computer code for data simulation under a model is arguably a superb and underutilized method to explain a statistical model to non-statisticians.

Additional advantages of data simulation include [17,18]: (1) Truth is known, hence, you can validate your model or your code to fit it. (2) It may help you understand complicated statistical concepts. For instance, if you don’t understand what a standard error is, you can repeatedly simulate a data set, estimate some parameter and realize that the standard error is simply the standard deviation of these estimates over replicates. (3) You can evaluate bias and precision of your estimators. (4) Power analysis evaluates the probability with which you can reject a null hypothesis in a significance test, and data simulation is the most general manner of evaluating power. (5) Study design (e.g., what’s the minimum required sample size) is also best approached with simulated data. (6) To check the robustness of a model to assumption violations, we can simulate data under a more general model and then fit a simpler model that lacks crucial assumptions.

4. Check model performance

Working with Bayesian statistics is an iterative process consisting of multiple rounds of building, assessing, and revising models (Tip #3). Model assessment typically has several steps too, and most focus on either MCMC performance or model goodness-of-fit (GOF; Tip #5). Obtaining reliable inferences from a Bayesian model requires that we run multiple chains and assess their convergence and adequate mixing to provide us with valid posterior samples.

“Convergence” implies the Markov chains have stabilized and samples are being generated from the desired posterior distribution. This is required for valid inferences from the random numbers produced by an MCMC algorithm. “Mixing” refers to the degree to which different MCMC chains sample the same parameter space. Visualization is one of the best tools for Bayesian model assessments in general [14] and time-series, or trace plots, of the MCMC chains allow us to check convergence and mixing and subsequently adapt our model accordingly (Fig 3).

thumbnail
Fig 3. Overview of commonly observed patterns in MCMC trace plots and how to interpret them for diagnostics.

The x-axis gives the iteration number and the y-axis gives the value sampled for a parameter. The colors of the writing link back to the color-coding of the steps in Bayesian modeling workflow depicted in Fig 1. Converged chains look like they are stable and fluctuating around a single average. Well-mixing chains have a high degree of overlap with each other. Suboptimal mixing, chains converging to different solutions, and chains that—at convergence—still sample the entire parameter space defined by the prior distribution often indicate problems with the model that warrant further investigation.

https://doi.org/10.1371/journal.pcbi.1012898.g003

Non-convergence can often be addressed by running the algorithm for more iterations. Poor mixing can sometimes be improved by reparameterization (chapter 12 in [19]), or selecting different MCMC algorithms, but may also suggest underlying model issues that need addressing, e.g., non-identifiable parameters (Tip #6) or assumption violations. Quantitative metrics for checking MCMC convergence and chain mixing should complement visualizations, e.g., the potential scale reduction statistic R-hat [20], which measures divergence in the behavior of multiple chains.

5. Evaluate model goodness-of-fit

How well a model fits the data is crucial for the trust you can put into the parameter estimates it produces. GOF tests are well-established in frequentist statistics, and many can be applied to simple Bayesian models (e.g., residual analysis). However, Bayesian methods are often used for more complex models, for which we lack simple off-the-shelf GOF tests [21].

Posterior predictive checks, which simulate new datasets from the model’s posterior and compare them to the actual data, are commonly used. The more similar simulated and observed datasets are, the more likely the model fits well; this can be assessed visually and using a ‘Bayesian p-value’ [14,22]. Prior predictive checks, based on prior distributions alone (without using data from the analysis), assess adequacy using subject-matter knowledge [23] and may suggest models (especially priors) are inadequate when they predict impossible data (e.g., negative body weight, fewer animals alive than killed per year).

Last but not least: expert knowledge is essential for model checking. The first stage in model checking should be asking the question: “Do the estimates make biological sense?”. If the answer is no, the model needs revising.

6. Beware of model non-identifiability

The Bayesian approach and MCMC methods enable the construction of complex models, but may risk over-parameterization and non-identifiable parameters—those that are confounded and not independently estimable [24]. Models with non-identifiable parameters often show poor MCMC mixing and may converge slowly. However, detecting non-identifiability can be challenging, as parameters may appear estimable from available data even when they are not [24].

To diagnose non-identifiability, simulations are powerful (Tip #3). An inability to recover true parameter values from simulated data may suggest potential non-identifiability, as can a high correlation between MCMC samples for two parameters in pairwise scatter plots. Examination of the overlap between prior and posterior distributions is helpful because non-identifiable parameters often show substantial overlap and limited ‘Bayesian learning’ [25]. However, large overlap may also result from an informative prior aligning with the posterior, hence overlap alone cannot confirm non-identifiability. Frequentist methods should not be forgotten. For instance, profiling the likelihood [26] involves maximizing a likelihood with respect to all parameters except one, held constant at a range of values. A flat profile likelihood indicates non-identifiability for that parameter. Other methods using symbolic algebra can diagnose non-identifiability, but require advanced expertise and may quickly become impractical with many parameters [24].

If a model is not identifiable, you will likely have to simplify the model structure (Tip #3) until the issue is resolved. In addition, you should consider reparameterizing your model [2628]. If the problem still persists, evaluate the possibilities for using informative priors to provide additional information for non-identifiable parameters [27,2931] or collecting additional data as required for an identifiable model.

7. Compare models

In the hypothetico-deductive framework, models are compared to evaluate the relative strength of evidence in the data supporting alternative hypotheses. In Bayesian statistics, this is achieved by assessing models based on their probability of being true given the data, characterized by the posterior model probability.

An approach to derive these probabilities is through Bayes factors, but this approach can be computationally demanding, and particularly sensitive to priors [32], which has limited its use in practice [33]. An alternative is to compute posterior model probabilities using reversible jump MCMC, a relatively straightforward approach to implement when selecting among a set of explanatory covariates.

When selecting models, it is essential to consider the goals of your analysis [34]. Is the focus on understanding underlying mechanisms (inference) or on prediction? A model with the highest posterior probability might not always be the best for predictive purposes. For model selection based on predictive ability [35], you can evaluate predictions either in-sample (using the same data the model was fit to) or out-of-sample (using new data). The latter is generally considered the most reliable approach but requires splitting your data into subsets for fitting and prediction. As a shortcut, the predictive ability can be estimated in-sample using methods like the widely applicable information criterion [36] and leave-one-out cross-validation [37].

Alternatively, one might forego Bayesian model selection altogether. Instead, a single comprehensive model can be constructed and refined iteratively through fitting, testing, and critiquing steps [38,39]. This approach emphasizes exploring model variants to understand the system better, rather than choosing a single “best” model.

8. Know your tools

Just as you wouldn’t typically write optimization code from scratch to fit a model in the frequentist framework, we recommend using established software with reliable, well-tested, and optimized MCMC algorithms. We focus on free options here, and there are numerous choices for Bayesian statistics available in R, Python, and Julia [15].

Selecting software based solely on speed and efficiency is challenging [40], as it involves more than just measuring raw computation time. You also need to factor in your experience level and (un)familiarity with a modeling language.

Bayesian software generally falls into two categories: general-purpose model-fitting engines requiring coding such as WinBUGS/OpenBUGS [41], JAGS [42], Stan [43], or NIMBLE [44], and those with built-in models such as JASP [45], PyMC [46], or brms [47]. Coding offers theoretically unlimited flexibility for custom models, but non-coding options handle many tasks with minimal effort. Prioritize getting the code to work before optimizing for performance. Custom R packages such as brms offer ease of use, often adopting standard R conventions for model specification. On the other hand, MCMC engines such as JAGS, Stan, and NIMBLE offer flexibility to describe novel models of extraordinary complexity, and enhance understanding of the different steps of a Bayesian analysis.

For a beginner, it may be wise to pick one software and stick with it, as familiarity helps with debugging, knowledge of useful tricks, and implementing advanced techniques. However, as you gain confidence, consider diversifying your toolkit to tackle tasks that may be challenging with your default software.

9. Embrace reproducibility

Awareness of reproducibility’s importance is growing in the biological sciences [48,49], with publishers and funders emphasizing the publication of well-documented data and code [50]. Modern research workflows begin with study design and data collection, and end with presenting results. Ensuring reproducibility increases the quality and credibility of your work, enhances efficiency in debugging and re-running analyses, and enables broader use of your model and indeed your entire workflow (Tip #10). Given the randomness inherent to MCMC and the many steps and decisions in Bayesian workflow (Fig 1), considering reproducibility from the start—not just as an afterthought—could become a superpower in your work with Bayesian models.

Four pillars support reproducibility: (1) Control of randomness: Specifying seeds for random number generators when simulating data, setting initial values, and running MCMC ensures consistent results. This enhances reproducibility and simplifies debugging, especially with a complete set of initial values. (2) Clean coding [51]: Adopting best practices for writing code [52] helps others and yourself understand and re-run analyses later. Clean coding is also the first step in automating your workflow and facilitates running code on high-performance computing setups. (3) Good documentation means thoroughly annotating your code and documenting workflow steps, which benefits others and increases potential for broader impact. (4) Version control using git repositories (GitHub/GitLab) facilitates code development and management and promotes collaboration [53].

10. Learn and get help from others

Learning Bayesian statistics can be daunting. Fortunately, you are not alone on this journey. We recommend you engage with the Bayesian community within your field of research by leveraging available resources, such as online forums, workshops, and textbooks.

A good starting point is to identify an introductory textbook relevant to your field of biology that covers Bayesian statistics. To build confidence in your skills, consider conducting side-by-side analyses using both frequentist and Bayesian approaches [9,5456]. This comparative practice can help you appreciate that numerical results often align. Begin with a simple project of your own or replicate a past analysis from your work or published studies.

If you have questions, don’t hesitate to seek help from forums such as Cross Validated or Stack Overflow or more specialized, subject-matter lists. For software-specific inquiries, consider reaching out through mailing lists or forums, and best include a small, reproducible example to illustrate your problem. The feedback you receive often benefits other beginners as well.

Attending workshops can be an excellent way to learn under the guidance of experienced teachers. These events also offer excellent networking opportunities. As you become more advanced, workshops provide avenues to master new methods and further enhance your skills.

Remember, modern science is a collaborative effort, and Bayesian statistics is no exception. If a task feels beyond your current expertise, seek collaboration to learn from others and achieve your research goals.

Conclusion

Bayesian statistics has grown rapidly in biology, although it remains a technically challenging subject that many researchers had insufficient exposure to during their graduate studies. Learning a new skill can be demanding and time-consuming. While the material we discussed is not new and has been explored by others [2,57,58], our tips aim to offer short and practical guidance to help you get started. These insights are designed to support your journey through Bayesian statistics in biological research, regardless of your specific field. We believe that the effort in learning Bayesian statistics is highly warranted for an early-career scientist and over time will pay off many times over.

Acknowledgments

We sincerely thank the three referees (including Chris Sutherland and two anonymous colleagues) and Osvaldo Martin for their insightful comments on our manuscript. We also extend our gratitude to the attendees of our workshops and the students in our lectures for their valuable feedback over the years.

Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.

References

  1. 1. Clark JS. Why environmental scientists are becoming Bayesians. Ecol Lett. 2004;8(1):2–14.
  2. 2. van de Schoot R, Depaoli S, King R, Kramer B, Märtens K, Tadesse MG, et al. Bayesian statistics and modelling. Nat Rev Methods Primers. 2021;1(1).
  3. 3. Kruschke JK. Doing Bayesian data analysis. A tutorial with R, JAGS and Stan. 2nd ed.; 2015.
  4. 4. McElreath R. Statistical rethinking: a Bayesian course with examples in R and Stan. 2nd ed. Boca Raton: Chapman & Hall/CRC; 2020.
  5. 5. McCarthy MA. Bayesian methods for ecology. Cambridge, UK; New York: Cambridge University Press; 2007.
  6. 6. Millar RB. Maximum likelihood estimation and inference: with examples in R, SAS and ADMB. John Wiley & Sons; 2011.
  7. 7. McCarthy MA, Masters P. Profiting from prior information in Bayesian analyses of ecological data. J Appl Ecol. 2005;42(6):1012–9.
  8. 8. Lemoine NP. Moving beyond noninformative priors: why and how to choose weakly informative priors in Bayesian analyses. Oikos. 2019;128(7):912–28.
  9. 9. Kéry M, Kellner K. Applied statistical modelling for ecologists: a practical guide to Bayesian and likelihood inference using R, JAGS, NIMBLE, Stan and TMB. Elsevier, Academic Press; 2024.
  10. 10. Mikkola P, Martin OA, Chandramouli S, Hartmann M, Abril Pla O, Thomas O, et al. Prior knowledge elicitation: the past, present, and future. Bayesian Anal. 2024;19(4).
  11. 11. Kass RE, Caffo BS, Davidian M, Meng X-L, Yu B, Reid N. Ten simple rules for effective statistical practice. PLoS Comput Biol. 2016;12(6):e1004961. pmid:27281180
  12. 12. Zitomer RA, Karr J, Kerstens M, Perry L, Ruth K, Adrean L, et al. Ten simple rules for getting started with statistics in graduate school. PLoS Comput Biol. 2022;18(4):e1010033. pmid:35446846
  13. 13. Gelman A, Hill J, Vehtari A. Regression and other stories. 1st ed. Cambridge New York, NY Port Melbourne, VIC New Delhi Singapore: Cambridge University Press; 2020.
  14. 14. Gabry J, Simpson D, Vehtari A, Betancourt M, Gelman A. Visualization in Bayesian workflow. J R Stat Soc A. 2019;182(2):389–402.
  15. 15. Štrumbelj E, Bouchard-Côté A, Corander J, Gelman A, Rue H, Murray L, et al. Past, present and future of software for Bayesian inference. Statist Sci. 2024;39(1).
  16. 16. Gelman A, Shirley K. Inference from simulations and monitoring convergence. Handbook of Markov Chain Monte Carlo. 1st ed. New York: Chapman and Hall/CRC; 2011. p. 162–74. https://doi.org/10.1201/b10905-7
  17. 17. DiRenzo GV, Hanks E, Miller DAW. A practical guide to understanding and validating complex models using data simulations. Methods Ecol Evol. 2022;14(1):203–17.
  18. 18. Kéry M, Royle J. Applied hierarchical modeling in ecology: analysis of distribution, abundance and species richness in R and BUGS. Amsterdam; Boston: Elsevier/AP, Academic Press is an imprint of Elsevier; 2016.
  19. 19. Gelman A, Carlin J, Stern H, Dunson D, Vehtari A, Rubin D. Bayesian data analysis, 3rd ed. CRC Press; 2013.
  20. 20. Vehtari A, Gelman A, Simpson D, Carpenter B, Bürkner P-C. Rank-normalization, folding, and localization: an improved R∘ for assessing convergence of MCMC (with Discussion). Bayesian Anal. 2021;16(2).
  21. 21. Conn PB, Johnson DS, Williams PJ, Melin SR, Hooten MB. A guide to Bayesian model checking for ecologists. Ecol Monogr. 2018;88(4):526–42.
  22. 22. Gelman A, Meng X-L, Stern H. Posterior predictive assessment of model fitness via realized discrepancies. Stat Sin. 1996;6:733–60.
  23. 23. Box GEP. Sampling and Bayes’ inference in scientific modelling and robustness. J R Stat Soc Ser A 1980;143(4):383.
  24. 24. Cole D. Parameter redundancy and identifiability. Boca Raton: CRC Press; 2020.
  25. 25. Garrett ES, Zeger SL. Latent class model diagnosis. Biometrics. 2000;56(4):1055–67. pmid:11129461
  26. 26. Raue A, Kreutz C, Maiwald T, Bachmann J, Schilling M, Klingmüller U, et al. Structural and practical identifiability analysis of partially observed dynamical models by exploiting the profile likelihood. Bioinformatics. 2009;25(15):1923–9. pmid:19505944
  27. 27. Gustafson P. On model expansion, model contraction, identifiability and prior information: two illustrative scenarios involving mismeasured variables. Stat Sci. 2005;20(2).
  28. 28. Gelman A, van Dyk DA, Huang Z, Boscardin JW. Using redundant parameterizations to fit hierarchical models. J Comput Graph Stat. 2008;17(1):95–122.
  29. 29. Gelfand AE, Sahu SK. Identifiability, improper priors, and gibbs sampling for generalized linear models. J Am Stat Assoc 1999;94(445):247–53.
  30. 30. Swartz TB, Haitovsky Y, Vexler A, Yang TY. Bayesian identifiability and misclassification in multinomial data. Can J Stat. 2004;32(3):285–302.
  31. 31. Eberly LE, Carlin BP. Identifiability and convergence issues for Markov chain Monte Carlo fitting of spatial models. Stat Med. 2000;19(17–18):2279–94.
  32. 32. Kass RE, Raftery AE. Bayes factors. J Am Stat Assoc. 1995;90(430):773–95.
  33. 33. Muff S, Nilsen EB, Nater CR, O’Hara RB. Joint reply to “Rewriting results in the language of compatibility” by V. Amrhein and S. Greenland, and to “The evidence contained in the P-value is context dependent” by F. Hartig and F. Barraquand. Trends Ecol Evol. 2022;37(7):571–2. pmid:35414468
  34. 34. Tredennick AT, Hooker G, Ellner SP, Adler PB. A practical guide to selecting models for exploration, inference, and prediction in ecology. Ecology. 2021;102(6):e03336. pmid:33710619
  35. 35. Hooten MB, Hobbs NT. A guide to Bayesian model selection for ecologists. Ecol Monogr. 2015;85(1):3–28.
  36. 36. Watanabe S. A widely applicable Bayesian information criterion. J Mach Learn Res 2013;14:867–97.
  37. 37. Vehtari A, Simpson D, Gelman A, Yao Y, Gabry J. Pareto smoothed importance sampling. J Mach Learn Res. 2024;25(1):1–58.
  38. 38. Gelman A, Rubin DB. Avoiding model selection in Bayesian social research. Sociol Methodol. 1995;25:165.
  39. 39. Ver Hoef JM, Boveng PL. Iterating on a single model is a viable alternative to multimodel inference. J Wild Manag. 2015;79(5):719–29.
  40. 40. Bolker BM, Gardner B, Maunder M, Berg CW, Brooks M, Comita L, et al. Strategies for fitting nonlinear ecological models in R, AD Model Builder, and BUGS. Methods Ecol Evol. 2013;4(6):501–12.
  41. 41. Lunn D, Spiegelhalter D, Thomas A, Best N. The BUGS project: evolution, critique and future directions. Stat Med. 2009;28(25):3049–67. pmid:19630097
  42. 42. Plummer M. JAGS: A program for analysis of Bayesian graphical models using Gibbs sampling. Proceedings of the 3rd International Workshop on Distributed Statistical Computing (DSC 2003), Vienna, 20–22 March 2003. 2003. p. 1–10.
  43. 43. Stan Development Team. Stan modeling language users guide and reference manual, version 2.26.1; 2024. Available from: https://mc-stan.org
  44. 44. de Valpine P, Turek D, Paciorek CJ, Anderson-Bergman C, Lang DT, Bodik R. Programming with models: writing statistical algorithms for general model structures with NIMBLE. J Comput Graph Stat. 2017;26(2):403–13.
  45. 45. Love J, Selker R, Marsman M, Jamil T, Dropmann D, Verhagen J, et al. JASP: graphical statistical software for common statistical designs. J Stat Soft. 2019;88(2).
  46. 46. Abril-Pla O, Andreani V, Carroll C, Dong L, Fonnesbeck CJ, Kochurov M, et al. PyMC: a modern, and comprehensive probabilistic programming framework in Python. PeerJ Comput Sci. 2023;9:e1516. pmid:37705656
  47. 47. Bürkner P-C. brms: An R package for Bayesian multilevel models using stan. J Stat Soft. 2017;80(1).
  48. 48. Cohen-Boulakia S, Belhajjame K, Collin O, Chopard J, Froidevaux C, Gaignard A, et al. Scientific workflows for computational reproducibility in the life sciences: status, challenges and opportunities. Future Gener Comput Syst. 2017;75:284–98.
  49. 49. Powers SM, Hampton SE. Open science, reproducibility, and transparency in ecology. Ecol Appl. 2019;29(1):e01822. pmid:30362295
  50. 50. Jenkins GB, Beckerman AP, Bellard C, Benítez-López A, Ellison AM, Foote CG, et al. Reproducibility in ecology and evolution: minimum standards for data and code. Ecol Evol. 2023;13(5):e9961. pmid:37181203
  51. 51. Filazzola A, Lortie C. A call for clean code to effectively communicate science. Methods Ecol Evol. 2022;13(10):2119–28.
  52. 52. Cooper N, Hsing P-Y. A guide to reproducible code in ecology and evolution. London: British Ecological Society; 2017.
  53. 53. Braga PHP, Hébert K, Hudgins EJ, Scott ER, Edwards BPM, Sánchez Reyes LL, et al. Not just for programmers: How GitHub can accelerate collaborative and reproducible research in ecology and evolution. Methods Ecol Evol. 2023;14(6):1364–80.
  54. 54. Gelman A, Hill J. Data analysis using regression and multilevel/hierarchical models. 1st ed. Cambridge: Cambridge University Press; 2006.
  55. 55. Inchausti P. Statistical modeling with R: a dual frequentist and Bayesian approach for life scientists. Oxford, New York: Oxford University Press; 2022.
  56. 56. Fieberg J. Statistics for ecologists: a frequentist and Bayesian treatment of modern regression models. University of Minnesota Libraries Publishing; 2024. https://doi.org/10.24926/9781959870029
  57. 57. Wolkovich E, Davies T, Pearse W, Betancourt M. A four-step Bayesian workflow for improving ecological science. arXiv. 2024.
  58. 58. Gelman A, Vehtari A, Simpson D, Margossian C, Carpenter B, Yao Y. Bayesian workflow. arXiv. 2020.