Learn R Programming

glmmTMB (version 0.2.2.0)

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:

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.

See Also

fixef.glmmTMB.

Examples

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

# }

Run the code above in your browser using DataLab