Now that you’ve read the Get started section, let’s dive in the subtleties of Bayesian modelling using R.
Once you’ve installed the necessary packages, we can load rstanarm (to fit the models) and bayestestR (to compute useful indices).
rstanarm
bayestestR
library(rstanarm) library(bayestestR)
model <- stan_glm(Sepal.Length ~ Petal.Length, data=iris)
posteriors <- insight::get_parameters(model)
plot(density(posteriors$Petal.Length))