ranef.brmsfit {brms} | R Documentation |

## Extract Group-Level Estimates

### Description

Extract the group-level ('random') effects of each level
from a `brmsfit`

object.

### Usage

```
## S3 method for class 'brmsfit'
ranef(
object,
summary = TRUE,
robust = FALSE,
probs = c(0.025, 0.975),
pars = NULL,
groups = NULL,
...
)
```

### Arguments

`object` |
An object of class |

`summary` |
Should summary statistics 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. |

### Value

A list of 3D arrays (one per grouping factor).
If `summary`

is `TRUE`

,
the 1st dimension contains the factor levels,
the 2nd dimension contains the summary statistics
(see `posterior_summary`

), and
the 3rd dimension contains the group-level effects.
If `summary`

is `FALSE`

, the 1st dimension contains
the posterior draws, the 2nd dimension contains the factor levels,
and the 3rd dimension contains the group-level effects.

### Examples

```
## Not run:
fit <- brm(count ~ zAge + zBase * Trt + (1+Trt|visit),
data = epilepsy, family = gaussian(), chains = 2)
ranef(fit)
## End(Not run)
```

*brms*version 2.21.0 Index]