Do the ranef
and fixef
functions in lmer
give the random and fixed effect coefficients? If not what do they really give?
Data looks something like (this is a fake data):
id 1 1 1 2 2 2
weight 34 45 56 78 12 45
count 23 12 13 16 14 22
Model looks like mod <- lmer(weight ~ count + (1+count|id), data=d1)
where id
is a random effect in the model and count
is fixed effect.
I believed that the statement coef(model)$id[,"count"]
in R will give the random coefficients for count
by each id
.
Am I correct?
If yes then what does ranef(mod)
give?
Any help is much appreciated. Sorry for the confusion.