[R-sig-ME] Generalized mixed models for poisson distributions

Ben Bolker bolker at ufl.edu
Fri Oct 24 23:21:45 CEST 2008


Page E. Van Meter wrote:
>
> Thanks!
> To clarify the simple mistake I was making for possible future novice 
> readers of this mailing list:
> I did not understand that the glm function cannot handle random 
> effects (which Faraway NEVER mentions in his book). I also did not 
> understand that glmer and lmer can both handle non-linear data as long 
> as the "family" is specified.
>
> I am very comfortable with linear models, linear mixed effect models, 
> and non-linear models, but I have been having a lot of trouble 
> tackling non-linear mixed effect models. I really do wish we could all 
> agree on terms for these models (GLM is used for both general linear 
> mixed models and generalized mixed models in many fields). Anyway, 
> these were very rudimentary stumbling blocks that were not immediately 
> apparent to me, so hopefully this will clarify for others.
  1.  It is too bad about the GLM thing, but I think both usages 
("general" and "generalized" are here to stay).
  2. Just to clarify a tiny bit more: "nonlinear mixed effect models" 
usually implies normally distributed data (i.e. error terms) with 
non-linear, NON-linearizable dependence of expected values on continuous 
covariates (if they were linearizable then one could handle a 
normal-error model with family(gaussian,link="..."))
nlmer handles these -- it doesn't complain about a "family" argument, 
but based on a quick look on the output it looks like the function
actually ignores it.
  3. GLMMs handle exponential-family data and linearizable 
nonlinearities -- and they are indeed much harder than LMMs or GLMs.

> Ben Bolker wrote:
>> glm doesn't do mixed effects models at all.
>>
>>   You might (?) be confused about this because some software
>> packages (SAS in particular, I don't know about SPSS) use the acronym
>> GLM to refer to "general linear models" (rather than general*ized*
>> linear models).  Some particular kinds of linear mixed models
>> (nested, balanced designs) can be estimated using the same
>> general approaches used for ANOVA (in R, this would correspond
>> to using aov with an Error term in the model).
>>
>>   Linear models: lm (or aov)
>>   Generalized linear models: glm
>>
>>   For linear mixed models you need lme (in the nlme package)
>> or lmer (lme4).  For generalized linear mixed models you
>> need glmmPQL (MASS/nlme) or glmer (lme4).
>>
>>   Ben Bolker
>>
>>   
>




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