This vignette can be referred to by citing the package:

  • Makowski, Ben-Shachar, & Lüdecke (2019). bayestestR: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework. Journal of Open Source Software, 4(40), 1541, https://doi.org/10.21105/joss.01541

Effect Point-Estimates in the Bayesian Framework

Introduction

One of the main difference between the Bayesian and the frequentist frameworks is that the former returns a probability distribution of each effect (i.e., parameter of interest of a model, such as a regression slope) instead of a single value. However, there is still a need and demand, for reporting or use in further analysis, for a single value (point-estimate) that best characterise the underlying posterior distribution.

There are three main indices used in the literature for effect estimation: the mean, the median or the MAP (Maximum A Posteriori) estimate (roughly corresponding to the mode (the “peak”) of the distribution). Unfortunately, there is no consensus about which one to use, as no systematic comparison has ever been done.

In the present work, we will compare these three point-estimates of effect between themselves, as well as with the widely known beta, extracted from a comparable frequentist model. With this comparison, we expect to draw bridges and relationships between the two frameworks, helping and easing the transition for the public.

Experiment 1: Relationship with Error (Noise) and Sample Size

Methods

The simulation aimed at modulating the following characteristics:

  • Model type: linear or logistic.
  • “True” effect (original regression coefficient from which data is drawn): Can be 1 or 0 (no effect).
  • Sample size: From 20 to 100 by steps of 10.
  • Error: Gaussian noise applied to the predictor with SD uniformly spread between 0.33 and 6.66 (with 1000 different values).

We generated a dataset for each combination of these characteristics, resulting in a total of 2 * 2 * 9 * 1000 = 36000 Bayesian and frequentist models. The code used for generation is avaible here (please note that it takes usually several days/weeks to complete).

library(ggplot2)
library(dplyr)
library(tidyr)
library(see)

df <- read.csv("https://raw.github.com/easystats/circus/master/data/bayesSim_study1.csv")

Results

Statistical Modelling

We fitted a (frequentist) multiple linear regression to statistically test the the predict the presence or absence of effect with the estimates as well as their interaction with noise and sample size.

term estimate p
outcome_typelinear:estimateMean:value 10.8 0
outcome_typelinear:estimateMedian:value 10.8 0
outcome_typelinear:estimateMAP:value 10.7 0
outcome_typelinear:estimateCoefficient:value 10.5 0
outcome_typebinary:estimateMAP:value 4.4 0
outcome_typebinary:estimateMedian:value 4.3 0
outcome_typebinary:estimateMean:value 4.2 0
outcome_typebinary:estimateCoefficient:value 3.9 0

This suggests that, in order to delineate between the presence and the absence of an effect, compared to the frequentist’s beta:

  • For linear models, the Mean was the better predictor, closely followed by the Median, the MAP and the frequentist Coefficient.
  • For logistic models, the MAP was the better predictor, followed by the Median, the Mean and, behind, the frequentist Coefficient.

Overall, the median seems to be appears as a safe and approriate choice, maintaining a a high performance accross different types of models.

Experiment 2: Relationship with Sampling Characteristics

Methods

The simulation aimed at modulating the following characteristics:

  • Model type: linear or logistic.
  • “True” effect (original regression coefficient from which data is drawn): Can be 1 or 0 (no effect).
  • draws: from 10 to 5000 by step of 5 (1000 iterations).
  • warmup: Ratio of warmup iterations. from 1/10 to 9/10 by step of 0.1 (9 iterations).

We generated 3 datasets for each combination of these characteristics, resulting in a total of 2 * 2 * 8 * 40 * 9 * 3 = 34560 Bayesian and frequentist models. The code used for generation is avaible here (please note that it takes usually several days/weeks to complete).

df <- read.csv("https://raw.github.com/easystats/circus/master/data/bayesSim_study2.csv")

Results

Experiment 3: Relationship with Priors Specification

Discussion

Conclusions can be found in the guidelines section.