Learn R Programming

glmmTMB (version 0.1.1)

ranef.glmmTMB: 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 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:
conditional_model
a list of data frames, containing random effects for the conditional model.
zero_inflation
a list of data frames, containing random effects for the zero inflation.

See Also

fixef.glmmTMB.

Examples

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

Run the code above in your browser using DataLab