[R-sig-ME] Speed estimation for lmer?

Daniel Ezra Johnson danielezrajohnson at gmail.com
Thu Sep 11 23:56:56 CEST 2008


>> 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))
>    }
>

This must be a close cousin of the code that turns e.g.

d <- lmer(y~fixed(1|random),twelve,family="binomial")

into a call to glmer!




More information about the R-sig-mixed-models mailing list