easystats/bayestestR
:ghost: Utilities for analyzing Bayesian models and posterior distributions
What it solves
Many R packages can fit Bayesian models and extract posterior draws, but they often provide only a limited set of indices like point-estimates and confidence intervals. bayestestR solves this by providing a comprehensive and consistent set of functions to analyze and describe posterior distributions from various model objects, including those from rstanarm, brms, and BayesFactor.
How it works
The package provides tools to summarize posterior distributions (which represent parameters in a probabilistic fashion) using four main types of indices:
- Centrality: Estimates the center of the distribution using means, medians, or the Maximum A Posteriori (MAP) estimate (the mode).
- Uncertainty: Calculates Credible Intervals (CI) using methods like Highest Density Intervals (HDI), Shortest Probability Intervals (SPI), or Equal-Tailed Intervals (ETI).
- Effect Existence: Determines if an effect is different from zero using the Probability of Direction (pd), probability of the point null, or Bayes Factors (BF).
- Effect Significance: Evaluates if an effect size is non-negligible using the Region of Practical Equivalence (ROPE), which defines a range of values considered practically equivalent to the null.
Who it’s for
It is designed for researchers and data scientists using R who perform Bayesian analysis and need a standardized way to describe effects and their uncertainty, existence, and significance.
Highlights
- Unified Interface: The
describe_posterior()function can compute multiple indices (centrality, uncertainty, existence, and significance) simultaneously. - Flexible Compatibility: Works with popular Bayesian modeling packages like
brmsandrstanarm. - Advanced Testing: Implements the Savage-Dickey density ratio for Bayes Factors and ROPE-based equivalence testing.
- Automatic Range Detection: Includes
rope_range()to help users find appropriate default values for the Region of Practical Equivalence based on the model type.
Related
- Project
- Project
- Project
- Project
- Project