Last chance! 50% off unlimited learning
Sale ends in
ranef(object, ...)
## S3 method for class 'mer':
ranef(object, postVar = FALSE, drop = FALSE,
whichel = names(wt), ...)
"mer "
object.FALSE
.(Intercept)
If postVar
is TRUE
each of the data frames has an
attribute called "postVar"
which is a three-dimensional array
with symmetric faces.
When drop
is TRUE
any components that would be data
frames of a single column are converted to named numeric vectors.
ranef
is a data frame with k
rows and j columns. If postVar
is TRUE
the
"postVar"
attribute is an array of dimension j by j by k. The
kth face of this array is a positive definite symmetric j by j
matrix. If there is only one grouping factor in the model the
variance-covariance matrix for the entire random effects vector,
conditional on the estimates of the model parameters and on the data
will be block diagonal and this j by j matrix is the kth diagonal block.
With multiple grouping factors the faces of the "postVar"
attributes are still the diagonal blocks of this conditional
variance-covariance matrix but the matrix itself is no longer block
diagonal.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)
str(rr1 <- ranef(fm1, postVar = TRUE))
dotplot(rr1,scales = list(x = list(relation = 'free')))[["Subject"]]
##str(ranef(fm2, postVar = TRUE)) ## code not yet written
op <- options(digits = 4)
ranef(fm3, drop = TRUE)
options(op)
Run the code above in your browser using DataLab