I have another question regarding the lmer() and glmer() functions from the lme4 package.

Consider three models

lmer1 <- lmer(y ~ 1 + (1 | group.indicator), data=data)
glmer1 <- glmer(y ~ 1 + (1 | group.indicator), data=data, 
glmer2 <- glmer(y ~ 1 + (1 | group.indicator), data=data, 
                family=binomial(link="logit"), nAGQ=0)

Each model shall fit the given data without predictors. To be estimated is the intercept in each group. (The given data may vary between each model)

What method is used by R to fit each model and how is it computed? My goal is to fully understand these models. I want to be able to fit the models manually, if necessary.

The description of 'Package ‘lme4’' doesn't tell too much about explicit calculations.


1 Answer 1


IMO, the lmer package probably doesn't tell you much about explicit calculations because few people do this by hand. As far as I'm concerned as an applied statistician, the likelihood is maximized through black magic, and it works well enough, and I'm fine with that.

However, you could read pages 13 onwards from this article by Douglas Bates et al, which appears to go into the formulae involved. (I can't understand the math, but I suspect this may be what you're after.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.