[R-sig-ME] Speed estimation for lmer?
Douglas Bates
bates at stat.wisc.edu
Thu Sep 11 23:40:45 CEST 2008
On Thu, Sep 11, 2008 at 4:06 PM, Daniel Ezra Johnson
<danielezrajohnson at gmail.com> wrote:
>>> Roughly speaking: lmer and lmer2 aren't (I think) different any more,
>>> they were different branches of the same software. They should both
>>> be much faster than lme. glmer (from lme4) and glmmPQL (from nlme)
>>> should not be necessary unless you have binomial, Poisson, etc. data
>>> rather than normally distributed responses.
>>
>> Ben is correct. There are functions lmer and lmer2 in the current
>> lme4 package but lmer2 is just a stub that turns around and calls
>> lmer. If your response y is on a continuous scale then it should be
>> lmer that you use.
>
> so if my response is on a continuous scale, is there any difference between
>
> lmer(y~fixed+(1|random)) and
> glmer(y~fixed+(1|random),family="gaussian") ?
>
> the output is the same but since reading the above i'm wondering if
> 'plain' lmer is written to run faster?
Those calls will be equivalent but if you look closely at the object
produced by the glmer call you will find that it has been quietly
replaced by a call to lmer. There is a section in glmer that reads
if(family$family == "gaussian" && family$link == "identity") {
mc[[1]] <- as.name("lmer") # use lmer not glmer
mc$family <- NULL
return(eval.parent(mc))
}
More information about the R-sig-mixed-models
mailing list