Bayesian Modeling in R
Overview
Comprehensive Bayesian statistical modeling using Stan-based packages (brms, rstanarm), covering prior specification, posterior analysis, model comparison, and Bayesian workflow best practices.
brms: Bayesian Regression Models
Basic Models
library(brms)
# Linear regression
fit <- brm(
formula = y ~ x1 + x2,
data = df,
family = gaussian(),
seed = 123
)
# Logistic regression
fit_logit <- brm(
y ~ x1 + x2,
data = df,
family = ber
[Description truncada. Veja o README completo no GitHub.]