[R-sig-ME] Likelihood estimation by glm and glmer/lmer

Toni Hernandez-Matias ahmatias at gmail.com
Tue Sep 5 14:42:02 CEST 2017


Thank you very much Philip and Ben for your helpful messages!

Antonio

On Tue, Sep 5, 2017 at 2:24 PM, Ben Bolker <bbolker at gmail.com> wrote:

> anova(), AIC(), etc. work fine across glm / glmer models and have since
> 1.0-0 (Aug 2013).  More info on counting parameters (which are *numerator*
> or *model* degrees of freedom, not *residual* df) is available at ...
>
> http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#
> can-i-use-aic-for-mixed-models-how-do-i-count-the-
> number-of-degrees-of-freedom-for-a-random-effect
>
>
> On Tue, Sep 5, 2017 at 4:55 AM, Phillip Alday <phillip.alday at mpi.nl>
> wrote:
>
>> For "true likelihood" ... you should search the list archives for
>> discussions on REML vs ML estimation and D. Bates' comments on *the*
>> likelihood. But, yes, if you you use REML=FALSE in lmer, you are
>> estimating the likelihood.
>>
>> However, there's another problem with using AIC/BIC to compare mixed vs.
>> non-mixed models, namely how to count parameters in mixed models.
>> There's also been some discussion here of late with issues in counting
>> parameters in mixed models. For Bayesian models using DIC and WAIC, this
>> seems to be somewhat less of a problem because the effective number of
>> parameters is estimated as part of the procedure (maybe Jarrod Hadfield
>> or Paul Bürkner can comment/correct here), but there doesn't seem to be
>> a clear answer for what the actual number of parameters in a model is.
>> This is related to the degrees of freedom issue (
>> https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002d
>> values-not-displayed-when-using-lmer_0028_0029_003f
>> ).
>>
>> All that said, there's an older post on this list that suggests that you
>> can use the deviance (which is -2 log likelihood) to compare lm and lmer
>> models:
>>
>> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q4/022723.html
>>
>> I think newer versions of lme4 even support this explicitly without any
>> hacks.
>>
>> tl;dr: compare the likelihoods with REML=FALSE, but be careful with
>> counting parameters and hence AIC, etc.
>>
>> Best,
>> Phillip
>>
>>
>> On 09/05/2017 10:24 AM, Toni Hernandez-Matias wrote:
>> > Dear all,
>> >
>> > I would like to compare AIC values of a null model estimated with glm
>> > function and AIC values of models that only have random effects fitted
>> with
>> > glmer or lmer functions. I understand that they are comparable because
>> both
>> > estimate true likelihood. Could you confirm me this?
>> >
>> > Thank you very much in advance,
>> >
>> > Antonio
>> >
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>
>


-- 
*********************************************************

Antonio Hernandez Matias

Equip de Biologia de la Conservació
Departament de Biologia Evolutiva, Ecología i Ciències Ambientals
Facultat de Biologia  i Institut de Recerca de la Biodiversitat (IRBio)
Universitat de Barcelona (UB)
Av. Diagonal, 643
Barcelona      08028
Spain
Telephone: +34-934035857
FAX: +34-934035740
e-mail: ahernandezmatias at ub.edu

***********************************************************

	[[alternative HTML version deleted]]



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