Learn R Programming

brms (version 1.7.0)

brmsfit-class: 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 useful information.

Arguments

Slots

formula:

model formula; an object of class brmsformula

family:

model family; an object of class brmsfamily

data:

model.frame containing all variables used in the model

data.name:

name of the data frame; a character string

model:

model in Stan language; a character string

prior:

priors applied in the model; a tidy data.frame

autocor:

an object of class cor_brms containing the autocorrelation structure

threshold:

character string defining the threshold type used in ordinal models

ranef:

structure of group-level terms; a tidy data.frame

cov_ranef:

a list of customized group-level covariance matrices

loo:

empty slot for adding the loo information criterion after model fitting

waic:

empty slot for adding the waic information criterion after model fitting

fit:

fitted results including the posterior samples; an object of class stanfit

exclude:

names of parameters for which samples are not saved; a character vector

algorithm:

the name of the algorithm used to fit the model

version:

the version of brms and rstan with which the model was fitted

Details

Currently, the following S3 methods are available for class brmsfit:

as.data.frame, as.matrix, as.mcmc, coef, expose_functions, family, fitted, fixef, formula, hypothesis, launch_shiny, logLik, LOO, marginal_effects, model.frame, ngrps, nobs, pairs, parnames, plot, posterior_samples, predict, print, prior_samples, ranef, residuals, stancode, standata, stanplot, summary, update, VarCorr, vcov, WAIC.

See also methods(class = "brmsfit").

See Also

brms, brm, brmsformula, brmsfamily