R: Extract Random Effects

ranef.glmmTMB {glmmTMB} | R Documentation

## Extract Random Effects

### Description

Generic function to extract random effects from `glmmTMB` models, both for the conditional model and zero inflation.

### Usage

    ## S3 method for class 'glmmTMB'
    ranef(object, ...)

### Arguments

`object` | a `glmmTMB` model.
`...` | some methods for this generic function require additional arguments.

### Value

Object of class `ranef.glmmTMB` with two components:

`cond` | a list of data frames, containing random effects for the conditional model.
`zi` | a list of data frames, containing random effects for the zero inflation.

### Note

When a model has no zero inflation, the default behavior of `ranef` is to simplify the printed format of the random effects. To show the full list structure, run `print(ranef(model), simplify=FALSE)`. In all cases, the full list structure is used to access the data frames (see example).

### See Also

`fixef.glmmTMB`.

### Examples

    data(sleepstudy, package="lme4")
    model <- glmmTMB(Reaction ~ Days + (1|Subject), sleepstudy)
    ranef(model)
    print(ranef(model), simplify=FALSE)
    ranef(model)$cond$Subject

[Package glmmTMB version 0.2.2.0 Index]