| ranef.brmsfit {brms} | R Documentation |
Extract the group-level ('random') effects of each level
from a brmsfit object.
## S3 method for class 'brmsfit' ranef(object, summary = TRUE, robust = FALSE, probs = c(0.025, 0.975), pars = NULL, groups = NULL, ...)
object |
An object of class |
summary |
Should summary statistics
(i.e. means, sds, and 95% intervals) be returned
instead of the raw values? Default is |
robust |
If |
probs |
The percentiles to be computed by the |
pars |
Optional names of coefficients to extract. By default, all coefficients are extracted. |
groups |
Optional names of grouping variables for which to extract effects. |
... |
Currently ignored. |
If old is FALSE: A list of arrays
(one per grouping factor). If summary is TRUE,
names of the first dimension are the factor levels and names
of the third dimension are the group-level effects.
If summary is FALSE, names of the second dimension
are the factor levels and names of the third dimension are the
group-level effects.
Paul-Christian Buerkner paul.buerkner@gmail.com
## Not run:
fit <- brm(count ~ log_Age_c + log_Base4_c * Trt_c + (1+Trt_c|visit),
data = epilepsy, family = gaussian(), chains = 2)
ranef(fit)
## End(Not run)