R: Class 'brmsfit' of models fitted with the 'brms' package

brmsfit-class {brms} | R Documentation

## Class `brmsfit` of models fitted with the brms package

### Description

Models fitted with the `brms` package are represented as a `brmsfit` object, which contains the posterior samples, model formula, Stan code, relevant data, and other information.

### Details

See `methods(class = "brmsfit")` for an overview of available methods.

### Slots

`formula`

  A `brmsformula` object

`family`

  A `brmsfamily` object

`data`

  A `data.frame` containing all variables used in the model

`data.name`

  The name of `data` as specified by the user

`model`

  The model code in Stan language

`prior`

  A `brmsprior` object containing information on the priors used in the model

`autocor`

  An `cor_brms` object containing the autocorrelation structure if specified

`ranef`

  A `data.frame` containing the group-level structure

`cov_ranef`

  A `list` of customized group-level covariance matrices

`stanvars`

  A `stanvars` object or `NULL`

`stan_funs`

  A character string of length one or `NULL`

`loo`

  An empty slot for adding the `loo` information criterion after model fitting

`waic`

  An empty slot for adding the `waic` information criterion after model fitting

`R2`

  An empty slot for adding the `bayes_R2` (Bayesian R-squared) value after model fitting

`marglik`

  An empty slot for adding a `bridge` object after model fitting containing the log marginal likelihood (see `bridge_sampler` for details)

`fit`

  An object of class `stanfit` among others containing the posterior samples

`exclude`

  The names of the parameters for which samples are not saved

`algorithm`

  The name of the algorithm used to fit the model

`version`

  The versions of brms and rstan with which the model was fitted

`file`

  Optional name of a file in which the model object was stored in or loaded from

### See Also

`brms`, `brm`, `brmsformula`, `brmsfamily`

[Package brms version 2.6.0 Index]