Bayesian statistics is an integral part of contemporary applied science. bayesics provides a single framework, unified in syntax and output, for performing the most commonly used statistical procedures, ranging from one- and two-sample inference to general mediation analysis. bayesics leans hard away from the requirement that users be familiar with sampling algorithms by using closed-form solutions whenever possible, and automatically selecting the number of posterior samples required for accurate inference when such solutions are not possible. bayesics} focuses on providing key inferential quantities: point estimates, credible intervals, probability of direction, region of practical equivalance (ROPE), and, when applicable, Bayes factors. While algorithmic assessment is not required in bayesics, model assessment is still critical; towards that, bayesics provides diagnostic plots for parametric inference, including Bayesian p-values. Finally, bayesics provides extensions to models implemented in alternative R packages and, in the case of mediation analysis, correction to existing implementations.
As is done colloquially, Bayesian statistics equates probability with uncertainty. Subsequently, a Bayesian definition of probability intends to quantify the amount of uncertainty, or lack of knowledge, about a particular truth or event. Bayesian analyses attempt to directly answer scientific queries, such as, "Is my hypothesis true?" or "How certain are we that there is a positive relationship between x and y?", leading to directly interpretable quantities. In contrast, frequentist inference is often difficult to interpret or requires additional steps to make scientific conclusions. For example, confidence intervals only allow for interpretation about the process and not about any specific realized confidence interval. The other frequen-Figure 1: Proportion of peer-reviewed articles catalogued by Europe PMC that contain either "credible interval" or "confidence interval" from 1981 -2025. tist mainstay is p-values, which are "too often misunderstood and misused in the broader research community" (Wasserstein and Lazar 2016) and have contributed to significant reproducibility concerns (Colquhoun 2017). Indeed, Greenland, Senn, Rothman, Carlin, Poole, Goodman, and Altman (2016) lists a large number of ways frequentist estimates and procedures are commonly misinterpreted, many of which correspond to correct interpretations from a Bayesian framework.
Thanks to prominent figures (de Finetti, DeGroot, Jeffreys, Savage, etc.) the Bayesian paradigm is well founded philosophically. It has a strong grounding in both theory and computation, is embedded in contemporary applied science and machine learning (Bon, Bretherton, Buchhorn, Cramb, Drovandi, Hassan, Jenner, Mayfield, McGree, Mengersen, Price, Salomone, Santos-Fernandez, Vercelloni, and Wang 2023), and is becoming more widely accepted in the life sciences by both industry and governmental regulatory bodies (Rosner, Laud, and Johnson 2021). Figure 1 shows the proportion of all peer-reviewed articles catalogued by Europe PMC that include the phrase “credible interval” as a proxy (and at least a lower bound) for how often Bayesian inference is being conducted in biomedical research. Starting around 2003, Bayesian inference has become drastically more widespread. However, Figure 1 also shows the trend for the search term “confidence interval,” illustrating that despite the dramatic uptick in the use of Bayesian statistics, frequentist statistics still dominate the life sciences. While the reasons for this are well beyond the scope of this paper, the authors conjecture that a primary driver may be the circularity of science and teaching described in the opening of Wasserstein and Lazar (2016)-frequentist statistics is taught because that is what regulators and journal editors expect, and regulators and editors expect frequentist statistics because that is what they were taught. On the other hand, the increased usage of Bayesian statistics has been asserted to be in large part the product of increased computational tools (e.g., Hagan and West 2010) and statistical software implementing Bayesian methodology (e.g., Štrumbelj, Bouchard-Côté, Corander, Gelman, Rue, Murray, Pesonen, Plummer, and Vehtari 2024).
There are a large number of R packages available for obtaining Bayesian inference for very specific tasks, many of which correspond to advanced statistical methods (causal analysis, network analysis, spatial statistics, etc.); for example, bama (Rix, Kleinsasser, and Song 2025) has the sole purpose of performing Bayesian inference for high-dimensional linear mediation models. On the other extreme lie advanced R packages aimed at building models from scratch and then obtaining Bayesian inference using them, most notably greta (Golding 2019), LaplacesDemon (Statisticat and LLC. 2021), NIMBLE (de Valpine, Turek, Paciorek, Anderson-Bergman, Temple Lang, and Bodik 2017), and rstan (Stan Development Team 2025).
More closely related to the aims of the newly developed R package bayesics, the subject of this manuscript, are those R packages which aim to do a set of commonly implemented analyses using Bayesian inferential techniques. BayesFactor (Morey and Rouder 2024) can perform Bayesian hypothesis testing for ANOVA, linear regression, and correlation (for two normally distributed samples), but, as the name suggests, provides only Bayes factors, and doesn’t provide point or interval estimation. For common one-and two-sample inferential procedures, DFBA (Barch and Chechile 2023) provides non-parametric Bayesian approaches, but no regression methods. In contrast, arm (Gelman and Su 2024) provides only regression methods. While arm relies primarily on the large sample normal approximation for posterior inference, more recent R packages that are focused on regression rely on Stan, a probabilistic programming language for specifying statistical models used primarily to implement No-U-Turn Hamiltonian Monte Carlo sampling (Carpenter, Gelman, Hoffman, Lee, Goodrich, Betancourt,
This content is AI-processed based on open access ArXiv data.