glmer vs lmer, what is best for a binomial outcome? I am trying to fit a mixed effects model with a binary outcome. I have one fixed effect (Offset) and one random effect (chamber, with muliple data points coming from each chamber).
In the text book "The R Book", (2007), pg 604, Crawley suggests using the lmer function with a binomial family for the analysis of binomial data where each participant contributes multiple responses (analagous to each of my chambers contributing multiple outcomes). Based on this example, I have used the following script for my data:
    ball=lmer(Buried~Offset+(1|Chamber), family=binomial, data=ballData)

When I run this model, I get this warning:
    calling lmer with 'family' is deprecated; please use glmer() instead

When I change my code to the following, the model works:
    ball=glmer(Buried~Offset+(1|Chamber), family=binomial, data=ballData)

Based on other questions/answers that I have read on Cross Validated, lmer should only be used for data where the outcome is normally distributed, and glmer is the correct function to use for a binomial outcome. My questions are:
1) Could anyone clarify the discrepency between Crawleys advice and the fact that lmer would not work for me (nor, based on what I have read on CVed, is it recommended to use this function for binomial data)
2) Is glmer indeed the correct function to use to model a binomial outcome with random factors?
3) Assuming that glmer is the correct function to use, I want to compare a model with and without random effects to determine if including random effects improves the fit of the model. I understand that glmer estimates model parameters via maximum likelihood. What function can I use to create a model with no random effects for a binary outcome using maximum likelihood? I was playing around with glm however the help file for this function states that the method of estimation is iteratively reweighted least squares (which is beyond me, but it isn't ML...)
 A: For 2, yes, you should use glmer or glm for binomial outcomes. If you have a little more time to wait for the model to fit---and especially if you are interested in inference for your random effects---I'd suggest using rstanarm::stan_glmer() and rstanarm::stan_glm respectively, which use the same syntax. The huge benefit here is that your uncertainty estimates come from a genuine posterior. Your predictions will also include uncertainty from the parameters. A tip though: make sure you scale your data to be in the single digits. 
Be warned that the posterior density of random effects tend to be skewed, so using likelihood-based methods (as in lme4) will tend to give you bad random effect estimates. 
3) The loo package allows comparison of your stan_ fits using an approximation to leave-one-out cross validation. I recommend taking a look.  
https://cran.r-project.org/web/packages/rstanarm/vignettes/glmer.html
A: 1) In previous versions of the lme4 package, you could run lmer using the binomial family. However, all this did was to actually call glmer, and this functionality has now been removed. So at the time of writing Crawley was correct.
2) Yes, glmer is the correct function to use with a binary outcome.
3) glm can fit a model for binary data without random effects. However, it is incorrect to compare a model fitted with glm to one fitted with glmer using a likelihood-based test because the likelihoods are not comparable. From your description, you have repeated measures within chambers. So, assuming that you have sufficient chambers and these can be thought of as a random sample from a larger population of chambers, then a priori you should retain the random intercepts for Chamber to control for possible non-independence of observations within chambers. You can think of random intercepts as being part of the experimental design.
On the other hand, if the random effect variance is very small and/or the inference or predictions for both the glm and glmer model are the largely the same, then it really doesn't matter which you use anyway.
