Fit a Bayesian regression model with brms and Stan

fit_brms(
  formula,
  data,
  family = gaussian,
  prior = brms::prior(normal(0, 1)),
  ...
)

Arguments

formula

An object of class formula with a symbolic description of the model to be fitted.

data

A data.frame containing the variables in the model.

family

A description of the error distribution and link function to be used in the model. See stats for mode details.

prior

The prior distribution of the coefficients. See brms for mode details. The default (prior(normal(0,1))) results in ridge regularization.

...

Other parameters for the model fitting function.

Value

A list with two data frames: gof contains goodness of fit measures of the fit and coefs contains the fitted coefficients.