Learn R Programming

brms (version 1.1.0)

coef.brmsfit: Extract model coefficients

Description

Extract model coefficients, which are the sum of population-level effects and corresponding group-level effects

Usage

"coef"(object, estimate = c("mean", "median"), ...)

Arguments

object
An object of class brmsfit
estimate
The point estimate to be calculated for the random effects, either "mean" or "median".
...
Further arguments to be passed to the function specified in estimate

Value

A list of matrices (one per grouping factor and non-linear parameter) with factor levels as row names and coefficients as column names.

Examples

Run this code
## Not run: 
# fit <- brm(count ~ log_Age_c + log_Base4_c * Trt_c + (1+Trt_c|visit), 
#            data = epilepsy, family = "poisson", chains = 1)
# ## extract population and group-level coefficients separately
# fixef(fit)
# ranef(fit)
# ## extract combined coefficients 
# coef(fit)
# ## End(Not run)

Run the code above in your browser using DataLab