The function returned by mkdevfun evaluates the
deviance of the model represented by the predictor
module, pp, and the response module, resp.
For lmer model objects the argument of the
resulting function is the variance component parameter,
theta, with lower bound. For glmer or
nlmer model objects with nAGQ = 0 the
argument is also theta. However, when nAGQ > 0,
the argument is c(theta, beta).