ranef {actuaRE} | R Documentation |
Extract the modes of the random effects
Description
A generic function to extract the conditional modes of the random effects from a fitted model object. For linear mixed models the conditional modes of the random effects are also the conditional means.
Arguments
object |
an object of a class of fitted models with random effects. |
Details
If grouping factor i has k levels and j random effects
per level the ith component of the list returned by
ranef
is a data frame with k rows and j columns.
Value
-
From
ranef
: An object composed of a list of data frames, one for each grouping factor for the random effects. The number of rows in the data frame is the number of levels of the grouping factor. The number of columns is the dimension of the random effect associated with each level of the factor.
Examples
library(lattice) ## for dotplot, qqmath
library(lme4)
fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
fm3 <- lmer(diameter ~ (1|plate) + (1|sample), Penicillin)
ranef(fm1)
[Package actuaRE version 0.1.5 Index]