[R-sig-ME] anova on lmer object

Luca Borger lborger at uoguelph.ca
Wed Feb 10 20:23:54 CET 2010


Hello,

>hope it's ok then, that I'm testing random effects using a LR test
>where one model is fitted using lmer and the other using glm.

no, if I remember well. Please check the mail list archive, this issue has 
been discussed in the past, also recently(-ish).


Cheers,

Luca


----- Original Message ----- 
From: "Doug Adams" <fog0 at gmx.com>
To: "walmes zeviani" <walmeszeviani at yahoo.com.br>; "R sig-mixed-models" 
<r-sig-mixed-models at r-project.org>
Sent: Wednesday, February 10, 2010 2:11 PM
Subject: Re: [R-sig-ME] anova on lmer object


Oh wait: when I fit the model without random effects I'm using glm,
and it doesn't give the option between REML and ML...  I'm guessing
the "iteratively reweighted least squares" method used to find
parameters for a glm doesn't have to do with ML techniques.  (?)   I
hope it's ok then, that I'm testing random effects using a LR test
where one model is fitted using lmer and the other using glm.

Thanks   :)


On Wed, Feb 10, 2010 at 11:52 AM, Doug Adams <fog0 at gmx.com> wrote:
> Thank you Walmes,
>
> That makes sense; I read somewhere that REML removes the effects of
> fixed effects, essentially, and calculates parameters based on
> residuals. I'll use full Maximum Likelihood on both models then.
> When I'm testing for random effects, does the choice between REML and
> full ML matter when using a LR test?
>
> Best wishes,
>
>
> On Wed, Feb 10, 2010 at 4:11 AM, walmes zeviani
> <walmeszeviani at yahoo.com.br> wrote:
>> Doug,
>>
>> Test fixed effects by single term in anova() and test by likelihood ratio
>> test are different. In anova you are assuming that random effects 
>> estimates
>> are the parametric values, in other words, this test is conditional to 
>> the
>> random effects.
>>
>> When you want to test fixed effects by double term in anova (anova(m1, 
>> m0))
>> you must use maximum likelihood (lmer(y~x1+x2+(1|x3), REML=FALSE)). It's
>> because REML is based in function of the fixed effects and ML not.
>>
>> Using "1" in your simple model means adjust to the general mean.
>>
>> At your disposal.
>> Walmes Zeviani, Lavras, MG - Brasil.
>>
>> ________________________________
>> De: Doug Adams <fog0 at gmx.com>
>> Para: walmes zeviani <walmeszeviani at yahoo.com.br>;
>> marianne.promberger at kcl.ac.uk; R sig-mixed-models
>> <r-sig-mixed-models at r-project.org>
>> Enviadas: Quarta-feira, 10 de Fevereiro de 2010 3:06:27
>> Assunto: Re: [R-sig-ME] anova on lmer object
>>
>> On Tue, Feb 9, 2010 at 4:32 PM, Doug Adams <fog0 at gmx.com> wrote:
>>> Thanks to both of you!
>>>
>>
>> If I only pass one model into the anova function, does it assume the
>> nested model being tested against is the one without fixed effects?
>>
>> And are the denominator degrees of freedom the ones listed in the output
>> table:
>> Df Sum Sq Mean Sq F value
>> division 2 103.59 51.793 1.0155
>>
>> If it's 2, am I correct in thinking that it's because my fixed effect
>> has 3 states, the first of which would be considered the baseline
>> against which the others are offset -- so it would exist in the model
>> without fixed effects? (So the baseline, and then the other 2
>> additional states for fixed effects...)
>>
>> One more question: If I want to explicitly spell out the simpler
>> model that doesn't have fixed effects so I can test for them, would
>> this be correct:
>> Complete Model: lmer(outcome ~ FixedEffect + (1|RandomGrouping),
>> data...)
>> Simplified Model: lmer(outcome ~ 1 + (1|RandomGrouping))
>>
>> so that "1" is like a placeholder for the first level?
>>
>> Goodness, thanks everyone for your patience with my endless questions.
>>
>> ________________________________
>> Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 -
>> Celebridades - Música - Esportes
>

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




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